So, place this at bottom of global.lua:
And just change the delay of each save, and you're done
If it doesn't work, place it in data/actions/lib/actions.lua instead!
Gimme rep if you like/use it plx
PHP:
saveDelay = 10 * 60 * 1000 -- 10 minutes for each save.
storageValue = 2342
if (getGlobalStorageValue(storageValue) == -1) then
function save(saveDelay)
saveData()
debugPrint(">>>>PLAYERS SAVED<<<<")
addEvent(save, saveDelay, saveDelay)
end
addEvent(save, saveDelay, saveDelay)
setGlobalStorageValue(storageValue, 1)
end
And just change the delay of each save, and you're done
If it doesn't work, place it in data/actions/lib/actions.lua instead!
Gimme rep if you like/use it plx
Last edited: