getSpectator(center, range x, range y, multi floor)
function getSpectatorsWithoutCenter(pos1, pos2)
local i = 1
local table = {}
for xx=pos1.x,pos2.x,1 do
for yy=pos1.y,pos2.y,1 do
for zz=pos1.z, pos2.z, 1 do
local checkPos = {x = xx, y = yy, z = zz, stackpos = 253} --I think 253 is the correct stackpos for creatures,not 100% sure
local thing = getThingFromPos(checkPos)
if isPlayer(thing) then
table[i] = thing
i = i + 1
end
end
end
end
return table
end