Doggynub
LUA / C++
- Joined
- Sep 28, 2008
- Messages
- 2,541
- Reaction score
- 186
why table.roemove dont work here?
LUA:
function eventStart()
players = {}
for v = frompos.x , topos.x do
for k = frompos.y , topos.y do
for i = 1, 200 do
position = {x = v, y = k, z = 7, stackpos = i}
pid = getThingfromPos(position).uid
if(pid ~= nil and isPlayer(pid)) then
table.insert(players, pid)
end
end
end
end
if math.mod(#players, 2) ~= 0 then
doTeleportThing(players[1],{x=94,y=125,z=7},false)
doSendMagicEffect(getThingPosition(players[1]),10)
doPlayerSendTextMessage(players[1], 19, table.concat(players,",").."")
for i = 1,#players do
table.remove(players,players[i])
end
doPlayerSendTextMessage(players[1], 19, table.concat(players,",").."")
end
end