Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 7132 then
return
elseif(item.actionid == 53232) and getPlayerStorageValue(cid, 35974) <= 1 then
doTeleportThing(getTopCreature({x=33167,y=31639,z=7}).uid, {x=33110,y=31589,z=12})
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have been teleported.")
elseif (item.actionid == 53233) and getPlayerStorageValue(cid, 35974) <= 1 then
doTeleportThing(getTopCreature({x=33107,y=31590,z=12}).uid, {x=33167,y=31639,z=7})
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have been teleported.")
elseif (item.actionid == 53234) and getPlayerStorageValue(cid, 35974) <= 1 then
doTeleportThing(getTopCreature({x=33109,y=31588,z=12}).uid, {x=33187,y=31697,z=13})
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have been teleported.")
elseif (item.actionid == 53235) and getPlayerStorageValue(cid, 35974) <= 1 then
doTeleportThing(getTopCreature({x=33187,y=31697,z=13}).uid, {x=33110,y=31589,z=12})
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have been teleported.")
end
return true
end
can someone tell me whats wrong with this script? , and i need to set doplayersetcancel. ?
thanks in advance (^_^)