Então galera, tenho esse script em meu ot. Porem se eu usar ele ele da 1 hora como ta no script. mas se eu usar ele logo em seguida, ele nao acumula o tempo (ficando 2 horas q no caso eu usei duas vezes, ele simplesmente começa a contar tudo de nodo, de 1 hora. Alguem pode por pra acumular a hora o tanto que for usando pf
Citarfunction onUse(cid, item, frompos, item2, topos)
local config = {
timeExhausted = 0, -- tempo em horas para poder usar o item novamente.
timeForUse = 1, -- tempo em horas que o player poderá entrar na cave.
exhausted = 156751,
storage = 789450,
toKnow = 456789,
effect = 27, -- efeito que dará ao usar o item.
}
if getPlayerStorageValue(cid, config.exhausted) < os.time() then
setPlayerStorageValue (cid, config.storage, config.timeForUse * 60 + os.time())
setPlayerStorageValue (cid, config.exhausted, config.timeExhausted * 60 + os.time())
doRemoveItem(item.uid,1)
setPlayerStorageValue (cid, config.toKnow, 1)
doSendMagicEffect (getThingPos(cid), config.effect)
doPlayerSendTextMessage (cid, 19, "Voce Usou a Bonus Area")
else
doPlayerSendTextMessage (cid, 19, "Voce precisa esperar "..getPlayerStorageValue(cid, config.exhausted)- os.time().." segundos")
end
return true
end
Meu Facebook
INFOS:
CitarCIDADE: Rio de janeiro
Idade: 22 anos
SOU: {"Scripter(lua)", "WebMaster", "ProgramadorC++"}
local config = { delrey = getPlayerCarValue(cid, DELREY), cigarro = getPlayerCancer(cid, DERBY), prostituta = getPlayerAIDS(cid, cracuda), tresOitao = getPlayerRevorvi(cid, 38) } if(delrey == "Ligado" and cigarro == "Aceso" and prostituta == "No Colo" and tresOitao == "Carregado") then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Começou o fim de semana. #PAS") end