data\globalevents\scritps\the script that boardcast.lua
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 = "Full s"
else
text = "S"
end
text = text .. "[COLOR="Lime"]server save within[/COLOR]" .. seconds .. " [COLOR="Lime"]seconds, please mind it may freeze![/color]"
doBroadcastMessage(text)
end
if(seconds > 0) then
addEvent(executeSave, config.events * 60000, seconds - config.events)
else
doSaveServer(config.shallow)
end
end
function onThink(interval, lastExecution, thinkInterval)
if(table.maxn(config.broadcast) == 0) then
doSaveServer(config.shallow)
else
executeSave(config.delay)
end
return true
end
lmao!! bbcodes cant be used in lua.....
ye there is it located
this is the script i think,
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 = "Full s" else text = "S" end text = text .. "[COLOR="Lime"]server save within[/COLOR]" .. seconds .. " [COLOR="Lime"]seconds, please mind it may freeze![/color]" doBroadcastMessage(text) end if(seconds > 0) then addEvent(executeSave, config.events * 60000, seconds - config.events) else doSaveServer(config.shallow) end end function onThink(interval, lastExecution, thinkInterval) if(table.maxn(config.broadcast) == 0) then doSaveServer(config.shallow) else executeSave(config.delay) end return true end
all what i made the colour Lime is what you see if there is a broadcast so thats what you can edit.
EDIT:
i was sleeping manthanks i edited it now