roriscrave
Advanced OT User
- Joined
- Dec 7, 2011
- Messages
- 1,210
- Solutions
- 35
- Reaction score
- 206
my server is currently with 30 players online and the save I put every 15 minutes in globalevents.xml (and this lags for 2 to 3 seconds during save)
My computer is not very good and I do not intend to acquire a host for now ... I wanted to "optimize" save
so I saw that there is the function
Is it possible to create a way of this function to execute in all online, but in parts not to mill?
For example saves 5 players, after 5 seconds saves 5 more, after 5 seconds saves 5 more and so on?
or do you have a better idea than mine?
I believe we all think better together
had thought that way, but it will be the same consumption of the function I'm already using, right?
LUA:
function onThink(interval, lastExecution)
saveServer()
return true
end
so I saw that there is the function
LUA:
player:save()
For example saves 5 players, after 5 seconds saves 5 more, after 5 seconds saves 5 more and so on?
or do you have a better idea than mine?
I believe we all think better together
had thought that way, but it will be the same consumption of the function I'm already using, right?
LUA:
function onThink(interval, lastExecution)
local players = Game.getPlayers()
for _, player in ipairs(players) do
player:save()
end
return true
end