VI
bug

Serve save bugado

Por VitinhoMapp, 30 de dez. de 2015 em Scripts

1
1.1k
VitinhoMappV
30 de dezembro de 2015 às 22:38

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!

 

 

Editado Dezembro 30 por VitinhoMapp