• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved teleport_ntiles.lua

hejd12345

New Member
Joined
Apr 11, 2012
Messages
255
Reaction score
1
Location
Sweden
I am using TFS 1.0 and my teleport ntiles command (/a) does not work.
Here is my codes:
talkactions.xml
Code:
    <talkaction words="/a" separator=" " script="gamemaster/teleport_ntiles.lua" />

and teleport_ntiles.lua
Code:
function onSay(cid, words, param)
    local player = Player(cid)
    if not player:getGroup():getAccess() then
        return true
    end
  
    local steps = tonumber(param)
    if not steps then
        return false
    end
  
    local position = player:getPosition()
    position:getNextPosition(player:getDirection(), steps)
  
    position = player:getClosestFreePosition(position, false)
    if position.x == 0 then
        player:sendCancelMessage("You cannot teleport there.")
        return false
    end
  
    player:teleportTo(position)
    return false
end

When I use the /a command nothing happens, does anyone know whats wrong?
 
have you set your account type to 5?(This is something loads of people are missing out to do, not shure if its 5 or 6!
 
Back
Top