Doggynub
LUA / C++
- Joined
- Sep 28, 2008
- Messages
- 2,541
- Reaction score
- 186
so i made this thing
But i want it to insert players if there is more than one player on same sqm , i know i have used getTopCreature, but i have tryed to use other and it didnt get any players.
LUA:
local players = {}
for v = frompos.x , topos.x do
for k = frompos.y , topos.y do
local position = {x=v,y=k,z=7}
local pid = getTopCreature(position).uid
if(pid ~= 0 and isPlayer(pid)) then
table.insert(players, pid)
end
end
end
But i want it to insert players if there is more than one player on same sqm , i know i have used getTopCreature, but i have tryed to use other and it didnt get any players.
Last edited: