• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Player teleport in area

Zell

Intermediate OT User
Joined
Oct 23, 2010
Messages
221
Reaction score
122
Hello,

I need a script that teleports players who are within an area

can anyone help me?

Thanks on advance
 
LUA:
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
change function onwhatever to onUse or onSay or whatever you want.
 
Back
Top