Não tenho certeza, mais tenta ai:
local config = {
segundos = 5,
lerIP = true
}
function sleep(n)
local t = os.clock()
while os.clock() - t <= n do end
end
function onLogout(cid)
local timeNow, playerIP, m_lastLogin, m_lastIP, seg = os.time(), getPlayerIp(cid), 0, 0, config.segundos
if m_lastLogin + config.segundos >= timeNow and (not config.lerIP or m_lastIP == playerIP) then
for i = 1, config.segundos do
doPlayerSendTextMessage(cid, 19, "[Pokémon X Timer] Aguarde "..seg.." segundo(s) Para Poder Deslogar!.")
sleep(1)
seg = seg - 1
end
return false
end
m_lastIP = playerIP
m_lastLogin = timeNow
return true
end





info
Grupo: Conde
Registrado: 14/04/15
Posts: 956
Reputação: +333
Gênero: Masculino
Eae pessoal blz?? estou com o sistema de login Delay! eu dei uma adaptada pequena, uma configuração mt facil, mas eu tentei colocar para aparecer quando tempo falta exatamente! tipo eu logo, ai deslogo em menos de 5 segundos, aparece uma mensagem dizendo 5 segundos, e dps antes dos 5 segundos aparece a mesma mensagem! eu gostaria de reformular ele, para aparecer tipo assim:
[Pokémon X Timer] Aguarde 5 segundo(s) Para Poder Deslogar!.
[Pokémon X Timer] Aguarde 4 segundo(s) Para Poder Deslogar!.
[Pokémon X Timer] Aguarde 3 segundo(s) Para Poder Deslogar!.
[Pokémon X Timer] Aguarde 2 segundo(s) Para Poder Deslogar!.
[Pokémon X Timer] Aguarde 1 segundo(s) Para Poder Deslogar!.
ai fica aparecendo de acordo com o tempo que falta! ta ai o script:
local config = { segundos = 5, lerIP = "yes" } config.lerIP = getBooleanFromString(config.lerIP) local m_lastLogin, m_lastIP = 0, 0 function onLogout(cid) local timeNow, playerIP = os.time(), getPlayerIp(cid) doPlayerSendTextMessage(cid,19, "[Pokémon X Timer] Aguarde "..config.segundos.." segundo(s) Para Poder Deslogar!.") if(m_lastLogin + config.segundos >= timeNow and (config.lerIP == FALSE or m_lastIP == playerIP)) then return false end m_lastIP = playerIP m_lastLogin = timeNow return true endUP