wesoly136
Member
- Joined
- Jul 30, 2009
- Messages
- 562
- Reaction score
- 8
Hi!
I've been using this code for many years, even when I was 13 years old, but now I just don't know how to make it working.
I tried almost all combinations. Also tried a script from old Evo server(with pvp arena for two players) - doesn't work(?!).
Is that part of code correct? What's wrong happened to this "function"?
I've been using this code for many years, even when I was 13 years old, but now I just don't know how to make it working.
Code:
pos = getThingPosition(item.uid)
local fro = {x=pos.x-3, y=pos.y-7, z=pos.z}
local to = {x=pos.x+3, y=pos.y-2, z=pos.z}
for xx = fro.x, to.x do
for yy = fro.y, to.y do
local area = {x=xx, y=yy, z=pos.z, stackpos = 253}
local ar = getThingFromPos(area)
if isPlayer(ar.uid) then
doPlayerSendCancel(cid, "There is someone there.")
doTeleportThing(cid, frompos, true)
return true
end
end
end
Is that part of code correct? What's wrong happened to this "function"?