I'm using this script, but I would like that after the save it send on broadcast a message [Auto Save] Server salvo com sucesso! and save 5 in 5 hours.
Code:
local config = {
broadcast = {120, 30},
shallow = "no",
delay = 120,
events = 30
}
config.shallow = getBooleanFromString(config.shallow)
local function executeSave(seconds)
if(isInArray(config.broadcast, seconds)) then
local text = ""
if(not config.shallow) then
text = "[Auto Save]"
else
text = "O"
end
text = text .. " Serve irá salvar em " .. seconds .. " segundos, porfavor aguarde!"
doBroadcastMessage(text)
end
if(seconds > 0) then
addEvent(executeSave, config.events * 1000, seconds - config.events)
else
doSaveServer(config.shallow)
end
end
function onThink(interval)
if(table.maxn(config.broadcast) == 0) then
doSaveServer(config.shallow)
else
executeSave(config.delay)
end
return true
end