local config = {
boxaid = xxxx --The action id of the box
item = xxxx --The item you will recieve
delay = xxxx --The delay storage value
hour = 60 * 60 * 1000 --Default: 1 hour
}
onUse(cid, item, fromPosition, toPosition)
if item.actionid ~= config.boxaid then
return true
end
if exhaustion.get(cid, config.delay) > 0 then
exhaustion.set(cid, config.delay, config.hour)
doPlayerSendCancel(cid, "You must wait 1 hour before recieving another backpack.")
return true
end
doPlayerAddItem(cid, config.item)
doPlayerSendCancel(cid, "You have recieved a backpack.")
return true
end