local t = {
a = {x=x, y=y, z=z}, -- top left corner
b = {x=x, y=y, z=z}, -- bottom right corner
c = {x=x, y=y, z=z} -- where to teleport
}
function onwhatever()
for _, pid in ipairs(getPlayersOnline()) do
if isInRange(pid, t.a, t.b) then
doTeleportThing(pid, t.c)
end
end
return TRUE
end