Eldora
Banned User
- Joined
- Oct 19, 2009
- Messages
- 604
- Reaction score
- 26
I can't get the "change citizen" portals to work properly, what is wrong in my script?
I get no errors in the console, but the teleport has no effect at all.
<movevent event="StepIn" uniqueid="8003" script="citizen/thais.lua"/>
I get no errors in the console, but the teleport has no effect at all.
<movevent event="StepIn" uniqueid="8003" script="citizen/thais.lua"/>
Lua:
function onStepIn(cid, item, position, fromPosition)
local pos = {x = 32369, y = 32241, z = 7}
if isPlayer(cid) == 1 then
doTeleportThing(cid, pos)
doPlayerSetTown(cid, 3)
doSendMagicEffect(getCreaturePosition(cid), 12)
end
end
function onAddItem(moveitem, tileitem, position)
local pos = {x = 32369, y = 32242, z = 6}
doTeleportThing(moveitem.uid, pos)
doSendMagicEffect(pos, 13)
end