Kod:
function onUse(cid, item, frompos, item2, topos)
local config = {
storage = 1000, -- change to your own storage value :)
item = 2497,
}
if getPlayerStorageValue(cid, config.storage) == -1 then
if getPlayerlevel(cid, config.level) =>35 then
setPlayerStorageValue(cid, config.storage, 1)
doPlayerSendTextMessage(cid,25,"You have found a crusader helmet.")
key = doPlayerAddItem(cid, config.item, 1) ~= -1
else
doPlayerSendTextMessage(cid,25,"Sorry, you have already taken the gift..")
end
return TRUE
end
Zakładki