• 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] TFS 1.3 - /tp x, y, z

namco

Alienbutserious
Joined
Sep 5, 2010
Messages
148
Solutions
2
Reaction score
38
Solution:
TFS 1.3 already has this command
Code:
<talkaction words="/pos" separator=" " script="position.lua" />
 
Last edited:
Lua:
function onSay(player, words, param)
    if not player:getGroup():getAccess() then
        return true
    end

    local x, y, z = param:match("(%d+), (%d+), (%d+)")
    local position = Position(tonumber(x), tonumber(y), tonumber(z))
    if position then
        player:teleportTo(position)
    end
    return false
end
 
Lua:
function onSay(player, words, param)
    if not player:getGroup():getAccess() then
        return true
    end

    local x, y, z = param:match("(%d+), (%d+), (%d+)")
    local position = Position(tonumber(x), tonumber(y), tonumber(z))
    if position then
        player:teleportTo(position)
    end
    return false
end
Not working plus no console errors
 
Back
Top