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

Lua Position script

nevix

Tunzodus.net
Joined
Mar 31, 2010
Messages
356
Reaction score
62
Location
Lithuanian
Hello again,


Someone maybe tell me how i can all player from x to x and from y to y do teleport to specified zone?
 
my brains maked this. But... :/

local t = {

from = {x = 32117, y = 32214, z = 7},
to = {x = 32125, y = 32219, z = 7},
t.center = {x = 32025, y = 32219, z = 7}
}

if getPlayerStorageValue(cid, 25001) == 1 then
doTeleportThing(cid,t.center)
end

I want eg all players who have 25001 storage be teleported
 
Code:
for _, pid in ipairs(getOnlinePlayers()) do
    if getPlayerStorageValue(pid, 25001) == 1 then
        doTeleportThing(pid,t.center)
    end
end
 
I got this error :/


Code:
for _, pid in ipairs(getOnlinePlayers()) do
    if getPlayerStorageValue(pid, 25001) == 1 then
        doTeleportThing(pid,t.center)
    end
end


aqyj3q.png



Code:
local function lmsclosed()
    broadcastMessage("Last Man Standing event portal closed and event started!", MESSAGE_STATUS_WARNING)
  

local t = {

from = {x = 32117, y = 32214, z = 7},
to = {x = 32125, y = 32219, z = 7},
center = {x = 32122, y = 32217, z = 6},
minPlayers2 = 1
}

for _, pid in ipairs(getOnlinePlayers()) do
    if getPlayerStorageValue(pid, 25001) == 1 then
        doTeleportThing(pid,t.center)
    end
end

return true
end
 
Last edited:
For a long work my brains maked it :DDD

Thx to you ;)

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
for _, pid in ipairs(getOnlinePlayers()) do
  if getPlayerStorageValue(pid, 25001) == 0 then
  local playerids = getPlayerByName(pid)
doTeleportThing(playerids,pos)
 
  doPlayerSendTextMessage(pid, MESSAGE_INFO_DESCR, "Your storage 25001 is: "..playerids.."")
 
  end
end
 
Back
Top