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

Teleport All Players Online With Storage...

Aarthec

w0000t
Joined
Apr 25, 2009
Messages
129
Reaction score
0
Location
Sweden
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.
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:
Back
Top Bottom