• 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!

My script request for tfs 1.2

gohamvsgoku

Member
Joined
Aug 21, 2017
Messages
151
Reaction score
9
function onLogin(player)

is possible this function check a player storage and do the player login in position declared?

StorageValue(9000, 1) if player have this storage login on xxxx,xxxx,x position?
 
function onLogin(player)

is possible this function check a player storage and do the player login in position declared?

StorageValue(9000, 1) if player have this storage login on xxxx,xxxx,x position?
put into login function
Lua:
if player:getStorageValue(9000) == 1 then
    player:teleportTo(Position(1000, 1000, 7))
end
 
Code:
local teleportPositions = {
--Key--
    [1] = {x = 1000, y = 1000, z = 7}, --If player storage value is 1 it will teleport them here
    [2] = {x = 1000, y = 1000, z = 7}, -- if player storage value is 2 it will teleport them here
    [3] = {x = 1000, y = 1000, z = 7}
}

local storageLoginPosition = 19000

if player:getStorageValue(storageLoginPosition) ~= -1 then
    local tmp_position = teleportPositions[player:getStorageValue(storageLoginPosition)]
    if tmp_position then
        player:teleportTo(tmp_position)
    end
end
 
Back
Top