Postado Dezembro 19, 2014 10 anos local tempo = 10 -- em segundoslocal strg = 12980 -- Storage onde salvará o tempo (Não Mexa)function onSay(cid, words, param) if not exhaustion.check(cid, strg) then if doPlayerRemoveItem(cid, 2160, 10) == TRUE then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce Desbugou!") doSendMagicEffect(getPlayerPosition(cid), 12) exhaustion.set(cid, strg, tempo) addLevel(cid, 1) else doPlayerSendCancel(cid, "Presisa De 10 Gold Para Desbugar!") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Presisa De 10 Gold Para Desbugar!") doSendMagicEffect(getPlayerPosition(cid), 2) end else doPlayerSendCancel(cid, "Voce precisa aguardar "..exhaustion.get(cid, strg).." segundos para usar novamente.") endend ta dando erro no local strg = 12980 <<< me ajuda
Postado Dezembro 19, 2014 10 anos Pode informar o erro? The corrupt fear us. The honest support us. The heroic join us.
Postado Dezembro 19, 2014 10 anos Autor Pode informar o erro? ta ai o erro Editado Dezembro 19, 2014 10 anos por delsonzovisk (veja o histórico de edições)
Postado Dezembro 19, 2014 10 anos Adicione à lib do seu servidor: exhaustion = { check = function (cid, storage) if(getPlayerFlagValue(cid, PLAYERFLAG_HASNOEXHAUSTION)) then return false end return getPlayerStorageValue(cid, storage) >= os.time(t) end, get = function (cid, storage) if(getPlayerFlagValue(cid, PLAYERFLAG_HASNOEXHAUSTION)) then return false end local exhaust = getPlayerStorageValue(cid, storage) if(exhaust > 0) then local left = exhaust - os.time(t) if(left >= 0) then return left end end return false end, set = function (cid, storage, time) setPlayerStorageValue(cid, storage, os.time(t) + time) end, make = function (cid, storage, time) local exhaust = exhaustion.get(cid, storage) if(not exhaust) then exhaustion.set(cid, storage, time) return true end return false end } Editado Dezembro 19, 2014 10 anos por Suicide (veja o histórico de edições) The corrupt fear us. The honest support us. The heroic join us.
Postado Dezembro 19, 2014 10 anos Autor Tente: function onSay(cid) local t = {cost = 10, exhausted = {12980, 10}} if (exhaustion.check(cid, t.exhausted[1])) then return doPlayerSendCancel(cid, "Voce precisa aguardar "..exhaustion.get(cid, t.exhausted[1]).." segundos para usar novamente.") elseif (getPlayerMoney(cid) < t.cost * 10000) then return doSendMagicEffect(getPlayerPosition(cid), 2) and doPlayerSendCancel(cid, "Precisa de "..t.cost.." gold bars para desbugar!") end addLevel(cid, 1) doPlayerRemoveMoney(cid, t.cost * 10000) exhaustion.set(cid, t.exhausted[1], t.exhausted[2]) doSendMagicEffect(getPlayerPosition(cid), 12) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce Desbugou!") return true end ta com o mesmo erro ainda =( sera que nao tem que coloca nada no actions?
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.