Postado Fevereiro 20, 2017 8 anos toda vez que uso esse comando ele aparece no default, queria que não aparecesse essa tal talkaction no default script Mostrar conteúdo oculto function onSay(cid, words, param, channel) local thisball = getPlayerSlotItem(cid, 8) if param ~= "" then return false end if words == "!revert" then if getItemAttribute(thisball.uid, "ehditto") then doItemSetAttribute(thisball.uid, "poke", "Ditto") doItemSetAttribute(thisball.uid, "ehditto", 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Puxe o ditto para terminar a reversão do ditto.') elseif getItemAttribute(thisball.uid, "ehshinyditto") then doItemSetAttribute(thisball.uid, "poke", "Shiny Ditto") doItemSetAttribute(thisball.uid, "ehshinyditto", 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Puxe o Shiny Ditto para terminar a reversão do Shiny Ditto.') else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você não está usando um Ditto ou Shiny Ditto.') end end end no xml tá assim <talkaction words="!revert" case-sensitive="no" event ="script" value ="dittorevert.lua"/> o script funciona normal
Postado Fevereiro 20, 2017 8 anos Solução function onSay(cid, words, param, channel) local thisball = getPlayerSlotItem(cid, 8) if param ~= "" then return false end if words == "!revert" then if getItemAttribute(thisball.uid, "ehditto") then doItemSetAttribute(thisball.uid, "poke", "Ditto") doItemSetAttribute(thisball.uid, "ehditto", 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Puxe o ditto para terminar a reversão do ditto.') elseif getItemAttribute(thisball.uid, "ehshinyditto") then doItemSetAttribute(thisball.uid, "poke", "Shiny Ditto") doItemSetAttribute(thisball.uid, "ehshinyditto", 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Puxe o Shiny Ditto para terminar a reversão do Shiny Ditto.') else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você não está usando um Ditto ou Shiny Ditto.') end end return true end Só adicionar o return true antes do ultimo end
Postado Fevereiro 20, 2017 8 anos Autor Tu é foda Poderia dizer porque esse script não tá mandando a mensagem ao tentar deslogar? local config = { storage = 23567, tempo = 5, lerIP = "yes" } config.lerIP = getBooleanFromString(config.lerIP) local m_lastLogin, m_lastIP = 0, 0 function onLogout(cid) if exhaustion.check(cid, config.storage) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, config.storage) .. " segundos para usar esse comando novamente.") return true end local timeNow, playerIP = os.time(), getPlayerIp(cid) if(m_lastLogin + config.tempo >= timeNow and (config.lerIP == FALSE or m_lastIP == playerIP)) then return false end m_lastIP = playerIP m_lastLogin = timeNow exhaustion.set(cid, config.storage, config.tempo*60) 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.