i have that script
this script work in chests box etc but when i put it to get reward with ground or small hole nothing;/
who know how fix it;/
Code:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 12645 and getPlayerStorageValue(cid, 12645) == -1 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found a golden key.")
key = doPlayerAddItem(cid, 2091, 1)
doSetItemActionId(key,3980)
setPlayerStorageValue(cid, 12645,1)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"It is empty.")
end
return 1
end
this script work in chests box etc but when i put it to get reward with ground or small hole nothing;/
who know how fix it;/