Postado Fevereiro 20, 2017 8 anos Esse scripting ta funcionando normal mais não manda a mensagem para o player 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
Postado Fevereiro 20, 2017 8 anos Estou deduzindo que sua tfs seja 1.x + então tente isto no lugar de "doPlayerSendTextMessage" Citar player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, config.storage) .. " segundos para usar esse comando novamente.")
Postado Fevereiro 21, 2017 8 anos Autor 21 horas atrás, Hugo Patriota disse: Estou deduzindo que sua tfs seja 1.x + então tente isto no lugar de "doPlayerSendTextMessage" Não é 1.x, obrigador por está tentando ajudar @DukeeH, @xWhiteWolf, @Vodkart, @Sekk Editado Fevereiro 21, 2017 8 anos por Andre Caraglio (veja o histórico de edições)
Postado Fevereiro 21, 2017 8 anos vai em data/lib/constant.lua e dá ctrl f em "MESSAGE_STATUS_CONSOLE_ORANGE" se não achar nada vc já tem sua resposta, esse tipo de mensagem não existe, aí vc dá ctr f em MESSAGE e vai achar algo parecido com isso aqui: MESSAGE_FIRST = 18 MESSAGE_STATUS_CONSOLE_RED = MESSAGE_FIRST MESSAGE_EVENT_ORANGE = 19 MESSAGE_STATUS_CONSOLE_ORANGE = 20 MESSAGE_STATUS_WARNING = 21 MESSAGE_EVENT_ADVANCE = 22 MESSAGE_EVENT_DEFAULT = 23 MESSAGE_STATUS_DEFAULT = 24 MESSAGE_INFO_DESCR = 25 MESSAGE_STATUS_SMALL = 26 MESSAGE_STATUS_CONSOLE_BLUE = 27 MESSAGE_LAST = MESSAGE_STATUS_CONSOLE_BLUE escolha uma "cor" e substitua, vc pode colocar ou o nome OU o numero.
Postado Fevereiro 21, 2017 8 anos Em 20/02/2017 ás 17:02, Andre Caraglio disse: Esse scripting ta funcionando normal mais não manda a mensagem para o player 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 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, 18, "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.