Okay, I am making a chest, that will add a KEY for a player with specific action ID. Anybody knows how to do it?
My script:
My script:
Code:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 8334 then
queststatus = getPlayerStorageValue(cid,8334)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You \'ve recieved a key.")
doPlayerAddItem(cid,2089,1)
setPlayerStorageValue(cid,8334,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
end
return 1
end