local config = {
storage = 44555,
exhaust = 10 -- Seconds
}
function onSay(cid, words, param, channel)
if exhaustion.check(cid, config.storage) then
doPlayerSendCancel(cid, 'You can\'t use this command yet['..exhaustion.get(cid, config.storage)..'].')
return true
else
exhaustion.set(cid, config.storage, config.exhaustion)
end
doPlayerSave(cid, true)
return true
end
local config = {
storage = 44555,
exhaust = 10 -- Seconds
}
function onSay(cid, words, param, channel)
if getPlayerStorageValue(cid, config.storage) > os.time() then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You must wait another " .. getPlayerStorageValue(cid, config.storage) - os.time() .. ' second' .. ((getPlayerStorageValue(cid, config.storage) - os.time()) == 1 and "" or "s") .. ".")
return true
end
doPlayerSave(cid, true)
setPlayerStorageValue(cid, config.storage, os.time() + config.exhaust)
return true
end
No, it isn'tIt's at 0.4_DEV aswell.
Your distro probably is missing the exhaustion lib.
It should works..![]()
doPlayerSendCancel(cid, "Voce pode salvar-se apenas uma vez por " .. config.exhaustion .. " minutos.")