Thorn
Spriting since 2013
Hello guys, im using tfs 1.3 and i have the default serversave from original tfs, but there's a small issue for me
i need the script to kick all players just after the game was saved, and someone told me that this script already kicks players when it's executed (altho i dont know in wich moment it kicks players)
anyway, this script doesn't kick players in any moment :/ so what might be failing? or how can i achieve what i need?
Also a kick durring the whole warning process wouldn't be what i need, cos ppl wont be able to login during that process wich last a couple of minutes >.<
thanks in advance!!
i need the script to kick all players just after the game was saved, and someone told me that this script already kicks players when it's executed (altho i dont know in wich moment it kicks players)
anyway, this script doesn't kick players in any moment :/ so what might be failing? or how can i achieve what i need?
Also a kick durring the whole warning process wouldn't be what i need, cos ppl wont be able to login during that process wich last a couple of minutes >.<
thanks in advance!!
Code:
local shutdownAtServerSave = false
local cleanMapAtServerSave = false
local function serverSave()
if shutdownAtServerSave then
Game.setGameState(GAME_STATE_SHUTDOWN)
else
Game.setGameState(GAME_STATE_NORMAL)
end
if cleanMapAtServerSave then
cleanMap()
end
saveServer()
end
local function secondServerSaveWarning()
Game.broadcastMessage('El juego hara save en 1 minuto. Procura estar en una zona segura.', MESSAGE_STATUS_WARNING)
addEvent(serverSave, 60000)
end
local function firstServerSaveWarning()
Game.broadcastMessage('El juego hara save en 3 minutos. Procura estar en una zona segura.', MESSAGE_STATUS_WARNING)
addEvent(secondServerSaveWarning, 120000)
end
function onTime(interval)
Game.broadcastMessage('El juego hara save en 5 minutos. Procura estar en una zona segura.', MESSAGE_STATUS_WARNING)
Game.setGameState(GAME_STATE_STARTUP)
addEvent(firstServerSaveWarning, 120000)
return not shutdownAtServerSave
end