bpm91
Intermediate OT User
- Joined
- May 23, 2019
- Messages
- 928
- Solutions
- 7
- Reaction score
- 127
- Location
- Brazil
- YouTube
- caruniawikibr
hello, I'm trying to make the player can enter through the door if he has the storage, if he doesn't have it warns that he doesn't have permission. But I can't get it to work, can anyone help?
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, 9999) ~= -1 then
doPlayerSendCancel(cid, "You don't have the necessary permission to enter.")
doSendMagicEffect(getPlayerPosition(cid))
return true
end
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, toPosition)
return true
end