I want all players online with storage 30008 with value 1 teleport to a location and players with value 2 teleport to another.
This doesn't work and I don't get any errors.
EDIT: Problem fixed ^^
This doesn't work and I don't get any errors.
Lua:
local players = getPlayersOnline()
local humanTeleportPos = {x=1898, y=16403, z=7}
local orcTeleportPos = {x=1882, y=16403, z=7}
for _, pid in ipairs(players) do
if getPlayerStorageValue(pid, 30008) == 2 then
doTeleportThing(pid, humanTeleportPos)
elseif getPlayerStorageValue(pid, 30008) == 1 then
doTeleportThing(pid, orcTeleportPos)
end
end
return TRUE
end
EDIT: Problem fixed ^^
Last edited: