• 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 Server save TFS 1.0 Gameworld is starting up

gurden

i need support for my server, good scripter!
Joined
May 19, 2009
Messages
519
Reaction score
5
Location
Sweden
Hello when my small saves starts people who is logged out can,t log in. People who are logged in stays inlogged but if you wanna log in on the server save it says Gameworld is starting up please wait. shutdownatserversave is false so why is this happening -.- I have a bad computer with very bad ram but i can hold the server up as long as i have server saves like every 5-10 min.

Code:
local shutdownAtServerSave = false
local cleanMapAtServerSave = false

local function serverSave()
    if shutdownAtServerSave then
        Game.setGameState(GAME_STATE_SHUTDOWN)
    else
        saveServer()

        if cleanMapAtServerSave then
            cleanMap()
        end

        Game.setGameState(GAME_STATE_NORMAL)
    end
end

local function secondServerSaveWarning()
    broadcastMessage("10 Sec to ServerSave", MESSAGE_STATUS_WARNING)
    addEvent(serverSave, 10000)
end

local function firstServerSaveWarning()
    broadcastMessage("15 Sec to ServerSave", MESSAGE_STATUS_WARNING)
    addEvent(secondServerSaveWarning, 15000)
end

function onThink(interval)
    broadcastMessage("30 Sec to ServerSave", MESSAGE_STATUS_WARNING)
    Game.setGameState(GAME_STATE_STARTUP)
    addEvent(firstServerSaveWarning, 60000)
    return not shutdownAtServerSave
end
 
Back
Top