Estou tentando adicionar exausted, em um item que recupera toda a stamina do personagem
porém ainda não está checando o exausted,
alguem poderia me ajudar ?
local time = 2000 -- Tempo de Exhaustion (1000 por segundos) function onUse(cid, item, fromPosition, itemEx, toPosition) local cfg = {} cfg.refuel = 42 * 60 * 1000 if getPlayerStorageValue(cid, 141012) >= os.time() then return true end if(getPlayerStamina(cid) >= cfg.refuel) then doPlayerSendCancel(cid, "Your stamina is already full.") else doPlayerSetStamina(cid, cfg.refuel) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled, please relog to activate.") doRemoveItem(item.uid) setPlayerStorageValue(cid, 141012, os.time() + time / 1000) return 1 end end return 1 end end
Obrg