Postado Agosto 14, 2019 5 anos Salve a todos, bom.. gostaria de implementar esse script, colocando Exausted nele para usar em x tempo novamente. tentei aqui com varios tutoriais mais nao tive exito. obrigado a todos deste já ! tfs:0.4 Script : Citar -- Créditos para Yan Liima - Night criador da script. local time = 4 -- em segundos 1 = 1 segundo 2 = 2 segundos... local say_events = {} local function SayText(cid) if isPlayer(cid) == TRUE then if say_events[getPlayerGUID(cid)] ~= nil then if isPlayer(cid) == TRUE then doSendAnimatedText(getPlayerPosition(cid),"Treinando!", math.random(01,255)) end say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000 / 2, cid) doCreatureSetNoMove(cid, true) end end return TRUE end function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Utilize '".. words .. " on' para ligar e '".. words .. " off' para desligar.") return true end if param == "on" then if isPlayer(cid) == TRUE then doSendAnimatedText(getPlayerPosition(cid),"Treinando", math.random(01,255)) end say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid) doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Você está em modo 'Training'.") doPlayerSendTextMessage(cid,20,"Para sair do modo 'training' diga ".. words .. " off") elseif param == "off" then stopEvent(say_events[getPlayerGUID(cid)]) say_events[getPlayerGUID(cid)] = nil doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Você não está mais em modo 'Training'.") doCreatureSetNoMove(cid, false) end return TRUE end
Postado Agosto 14, 2019 5 anos tente assim, se não funfar manda o erro. se funfar REP+ Obg. Spoiler --[[ Tag:Desbugar -- Kyyah Silva ]]-- local STORAGE_EXAUSTED = 91812 local exausted = 120 --Minutos. function onSay(cid, words) local storage = getPlayerStorageValue(cid, STORAGE_EXAUSTED) if storage > os.time() then return doPlayerSendCancel(cid, string.format("Aguarde %d segundo%s para usar este comando novamente.", storage - os.time(), storage - os.time() > 1 and "s" or "")) else local time = 4 -- em segundos 1 = 1 segundo 2 = 2 segundos... local say_events = {} local function SayText(cid) if isPlayer(cid) == TRUE then if say_events[getPlayerGUID(cid)] ~= nil then if isPlayer(cid) == TRUE then doSendAnimatedText(getPlayerPosition(cid),"Treinando!", math.random(01,255)) end say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000 / 2, cid) doCreatureSetNoMove(cid, true) end end return TRUE end function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Utilize '".. words .. " on' para ligar e '".. words .. " off' para desligar.") return true end if param == "on" then if isPlayer(cid) == TRUE then doSendAnimatedText(getPlayerPosition(cid),"Treinando", math.random(01,255)) end say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid) doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Você está em modo 'Training'.") doPlayerSendTextMessage(cid,20,"Para sair do modo 'training' diga ".. words .. " off") elseif param == "off" then stopEvent(say_events[getPlayerGUID(cid)]) say_events[getPlayerGUID(cid)] = nil doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Você não está mais em modo 'Training'.") doCreatureSetNoMove(cid, false) end return TRUE end Meus Projetos: Poké Memories- PokeMemories.com Dados 2019: Nome: Gabriel Salles Idade: 18 Cidade: Guarulhos - SP Conheci otServer's: 2011 Recomendo: otPokemon.com / otPokemonXY.net / pokemon-miw.com / Pokememories.com
Postado Agosto 14, 2019 5 anos Autor 12 minutos atrás, gagfota disse: tente assim, se não funfar manda o erro. se funfar REP+ Obg. Ocultar conteúdo --[[ Tag:Desbugar -- Kyyah Silva ]]-- local STORAGE_EXAUSTED = 91812 local exausted = 120 --Minutos. function onSay(cid, words) local storage = getPlayerStorageValue(cid, STORAGE_EXAUSTED) if storage > os.time() then return doPlayerSendCancel(cid, string.format("Aguarde %d segundo%s para usar este comando novamente.", storage - os.time(), storage - os.time() > 1 and "s" or "")) else local time = 4 -- em segundos 1 = 1 segundo 2 = 2 segundos... local say_events = {} local function SayText(cid) if isPlayer(cid) == TRUE then if say_events[getPlayerGUID(cid)] ~= nil then if isPlayer(cid) == TRUE then doSendAnimatedText(getPlayerPosition(cid),"Treinando!", math.random(01,255)) end say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000 / 2, cid) doCreatureSetNoMove(cid, true) end end return TRUE end function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Utilize '".. words .. " on' para ligar e '".. words .. " off' para desligar.") return true end if param == "on" then if isPlayer(cid) == TRUE then doSendAnimatedText(getPlayerPosition(cid),"Treinando", math.random(01,255)) end say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid) doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Você está em modo 'Training'.") doPlayerSendTextMessage(cid,20,"Para sair do modo 'training' diga ".. words .. " off") elseif param == "off" then stopEvent(say_events[getPlayerGUID(cid)]) say_events[getPlayerGUID(cid)] = nil doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Você não está mais em modo 'Training'.") doCreatureSetNoMove(cid, false) end return TRUE end Meus Projetos: Poké Memories- PokeMemories.com Dados 2019: Nome: Gabriel Salles Idade: 18 Cidade: Guarulhos - SP Conheci otServer's: 2011 Recomendo: otPokemon.com / otPokemonXY.net / pokemon-miw.com / Pokememories.com
Postado Agosto 14, 2019 5 anos Spoiler --[[ Tag:Desbugar -- Kyyah Silva ]]-- local STORAGE_EXAUSTED = 91812 local exausted = 120 --Minutos. function onSay(cid, words) local storage = getPlayerStorageValue(cid, STORAGE_EXAUSTED) return doPlayerSendCancel(cid, string.format("Aguarde %d segundo%s para usar este comando novamente.", storage - os.time(), storage - os.time() > 1 and "s" or "")) else local time = 4 -- em segundos 1 = 1 segundo 2 = 2 segundos... local say_events = {} local function SayText(cid) if isPlayer(cid) == TRUE then if say_events[getPlayerGUID(cid)] ~= nil then if isPlayer(cid) == TRUE then doSendAnimatedText(getPlayerPosition(cid),"Treinando!", math.random(01,255)) end say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000 / 2, cid) doCreatureSetNoMove(cid, true) end end return TRUE end function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Utilize '".. words .. " on' para ligar e '".. words .. " off' para desligar.") return true end if param == "on" then if isPlayer(cid) == TRUE then doSendAnimatedText(getPlayerPosition(cid),"Treinando", math.random(01,255)) end say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid) doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Você está em modo 'Training'.") doPlayerSendTextMessage(cid,20,"Para sair do modo 'training' diga ".. words .. " off") elseif param == "off" then stopEvent(say_events[getPlayerGUID(cid)]) say_events[getPlayerGUID(cid)] = nil doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Você não está mais em modo 'Training'.") doCreatureSetNoMove(cid, false) end return true end
Postado Agosto 15, 2019 5 anos Autor 7 horas atrás, gagfota disse: Mostrar conteúdo oculto --[[ Tag:Desbugar -- Kyyah Silva ]]-- local STORAGE_EXAUSTED = 91812 local exausted = 120 --Minutos. function onSay(cid, words) local storage = getPlayerStorageValue(cid, STORAGE_EXAUSTED) return doPlayerSendCancel(cid, string.format("Aguarde %d segundo%s para usar este comando novamente.", storage - os.time(), storage - os.time() > 1 and "s" or "")) else local time = 4 -- em segundos 1 = 1 segundo 2 = 2 segundos... local say_events = {} local function SayText(cid) if isPlayer(cid) == TRUE then if say_events[getPlayerGUID(cid)] ~= nil then if isPlayer(cid) == TRUE then doSendAnimatedText(getPlayerPosition(cid),"Treinando!", math.random(01,255)) end say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000 / 2, cid) doCreatureSetNoMove(cid, true) end end return TRUE end function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Utilize '".. words .. " on' para ligar e '".. words .. " off' para desligar.") return true end if param == "on" then if isPlayer(cid) == TRUE then doSendAnimatedText(getPlayerPosition(cid),"Treinando", math.random(01,255)) end say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid) doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Você está em modo 'Training'.") doPlayerSendTextMessage(cid,20,"Para sair do modo 'training' diga ".. words .. " off") elseif param == "off" then stopEvent(say_events[getPlayerGUID(cid)]) say_events[getPlayerGUID(cid)] = nil doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Você não está mais em modo 'Training'.") doCreatureSetNoMove(cid, false) end return true end
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.