Hello, i have problem with lever..
It teleports player when player stand on special X,Y,Z (getTopCreature) so its good but when no one stand on this item and player use lever than i have error in console:
I think i have to add something like
but where?
It teleports player when player stand on special X,Y,Z (getTopCreature) so its good but when no one stand on this item and player use lever than i have error in console:
Code:
[Error - Action Interface]
data/actions/scripts/zaolever.lua:onUse
Description:
(luaDoTeleportThing) Thing not found
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.actionid == 4830) then
doTeleportThing(getTopCreature({x=32991,y=31539,z=1}).uid, {x=32991,y=31539,z=4})
elseif (item.actionid == 4831) then
doTeleportThing(getTopCreature({x=32991,y=31539,z=4}).uid, {x=32991,y=31539,z=1})
elseif (item.actionid == 4832) then
doTeleportThing(getTopCreature({x=32993,y=31547,z=4}).uid, {x=33061,y=31527,z=10})
elseif (item.actionid == 4833) then
doTeleportThing(getTopCreature({x=33061,y=31527,z=10}).uid, {x=32993,y=31547,z=4})
end
return true
end
I think i have to add something like
Code:
doPlayerSendCancel(cid,"Sorry, not possible")
but where?
Last edited: