LucasFerraz
Systems Analyst
Hello,
I need a script:
If player do NOT have PZ he is teleported to position1.
If player have pz he is teleported to position2.
Maybe like this? I don't know :S
I need a script:
If player do NOT have PZ he is teleported to position1.
If player have pz he is teleported to position2.
Maybe like this? I don't know :S
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getCreatureStorage(cid, pz) < 0 then
if getCreaturePosition(cid).y < toPosition.x then
doTeleportThing(cid, { x = toPosition.x, y = toPosition.y + 1, z = toPosition.z }, true)
else
doTeleportThing(cid, { x = toPosition.x, y = toPosition.y- 1 , z = toPosition.z }, true)
end
else
doPlayerSendCancel(cid, "Sorry, not possible.")
end
return true
end