• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua help pass let script to tfs 1.0

Dennyz Dias

New Member
Joined
May 1, 2016
Messages
6
Reaction score
0
local config = {
broadcast = {120, 30},
shallow = "no",
delay = 120,
events = 30
}

config.shallow = getFromString(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 .. "erver vai ser salvo em " .. seconds .. " segundos, podera dar uma travada!"
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
 
Back
Top