Serve save bugado

VitinhoMapp
em Scripts

VitinhoMapp

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 28/01/12Posts: 54

olá, coloquei um script de um global que eu tinha no meu baiak, enfim ele ta dando as mensagens incorretamente:
5w0hsr1.png

(o server deu save na ultima mensagem as 22:23)

 

teria que ser :

Server save within 120 seconds, please mind it may freeze!

Server save within 60 seconds, please mind it may freeze!

Server save within 30 seconds, please mind it may freeze!

Server saving...

(mas pode ser só a msg de 120 segundos e a de server saving caso seja mais facil de fazer)

 

script:

 

local config = {
broadcast = {120, 30},
flags = 13,
delay = 120,
events = 30
}

local function executeSave(seconds)
if(isInArray(config.broadcast, seconds)) then
doBroadcastMessage("Server save within " .. seconds .. " seconds, please mind it may freeze!")
end

if(seconds > 0) then
addEvent(executeSave, config.events * 1000, seconds - config.events)
else
doSaveServer(config.flags)
end
end

function onThink(interval)
if(table.maxn(config.broadcast) == 0) then
doSaveServer(config.flags)
else
executeSave(config.delay)
end

return true
end

 

 

obrigado abraço!

 

 

"O verdadeiro mestre é um eterno aprendiz"