desculpa a demora estava no trabalho está aqui
local config = {
broadcast = {120, 30},
shallow = "no",
delay = 120,
events = 1
}
config.shallow =
getBooleanFromString(config.shallow)
local function executeSave(seconds)
if(isInArray(config.broadcast,seconds)) then
local text = ""
if(not config.shallow) then
text = "O s"
else
text = "S"
end
text = text .. "ever sera salvo em " .. seconds .. " segundos."
doBroadcastMessage(text)
end
if(seconds > 0) then
addEvent(executeSave, config.events * 1, seconds - config.events)
else
doSaveServer(config.shallow)
end
end
function onThink(interval, lastExecution, thinkinterval)
if(table.maxn(config.broadcast) == o) then
doSaveServer(config.shallow)
else
executeSave(config.delay)
doBroadcastMessage("Salvando o servidor...",27)
end
return true
end