Posts: 1,317
Threads: 23
Joined: Feb 2010
Reputation:
0
Why would you want to save every 10 seconds? Why not save when something actually changes? A lot of people are afraid of data loss due to crashes but I wouldn't recommend saving it in such a small interval. Say the player buys something expensive, just save when that happens, don't save small changes like 10 dollar, but maybe start at 10,000.
Posts: 985
Threads: 13
Joined: Sep 2011
Reputation:
0
Make a timer and start it under OnGameModeInit, then make the timer loop for everyone in the server and check if he is connected after that save his/her stats.
OR just save the player's stats when he leaves(OnPlayerDisconnect). <==== I recommend this one.
Posts: 185
Threads: 42
Joined: Aug 2012
Reputation:
0
I got a TDM Server - and when i kill someon and i do stats i see: kill: 2 , the last kill when i "/q"
EDIT: Can you helpme with the timer i don't know how to make it.
Posts: 985
Threads: 13
Joined: Sep 2011
Reputation:
0
Why not just make one timer instead of like 50+ to save the player's stats?
Posts: 2,698
Threads: 37
Joined: Mar 2012
Reputation:
0
Well why don't you try saving the stats under 'OnPlayerUpdate' callback?