• 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!

Global Save!

Joined
Sep 29, 2009
Messages
224
Reaction score
0
I try use globalsave in config more don't work ;s. I need global save with save,clean,shutdown.

Thanks :D
 
Lua:
 -- credits to Colandus
saveDelay = 10 * 60 * 1000 -- 10 minutes for each save.  
storageValue = 2342  

if (getGlobalStorageValue(storageValue) == -1) then  
    function save(saveDelay)  
        saveData()  
        print(">>>>PLAYERS SAVED<<<<")  
        addEvent(save, saveDelay, saveDelay)  
    end  
    addEvent(save, saveDelay, saveDelay)  
    setGlobalStorageValue(storageValue, 1)  
end
 
Lua:
local config =
{
	shallow = false
}


function onThink(interval)
	doBroadcastMessage("Game map cleaning and saving within 30 seconds, please pick up your items!")
	addEvent(function()
			doCleanMap()
		doSaveServer(config.shallow)
	end, 30 * 1000)
	return true
end
 
Back
Top