Save player account | OnPlayerUpDate or Timer ? -
jcvag44800 - 11.04.2012
Hi guys !
I am looking for a way to record the accounts of players in a server crash for example.
I thought of a "Timer" which make a backup every X seconds or use OnPlayerUpDate.
What is the best solution?
Cordially.
Re: Save player account | OnPlayerUpDate or Timer ? -
ViniBorn - 11.04.2012
Timer
OnPlayerUpdate is called around 30 times per second, per player.
Imagine this with 50 players online, and saving ...
Re: Save player account | OnPlayerUpDate or Timer ? -
jcvag44800 - 11.04.2012
Thanks.
How many seconds?
Re: Save player account | OnPlayerUpDate or Timer ? -
ViniBorn - 11.04.2012
I used 30 minutes in my server, with the average of 200 players online.
At least in my case, server crash was very rare ...
Re: Save player account | OnPlayerUpDate or Timer ? -
ReneG - 11.04.2012
Usually a one to two second timer is just fine.
Re: Save player account | OnPlayerUpDate or Timer ? -
Skribblez - 11.04.2012
I've experienced crashes on my server and there are only two ways wherein I save a player's data, I placed them under
OnPlayerDisconnect and
OnGameModeExit, it actually works fine so there's no need for me to save them on timers which requires usage of RAM causing lag on your server from what I know of, especially if they're called every second or two.
Note: I'm not sure of this, but it works just right in my case.
Re: Save player account | OnPlayerUpDate or Timer ? -
jcvag44800 - 11.04.2012
Thanks all ! I use 2 seconds!
Re: Save player account | OnPlayerUpDate or Timer ? -
[LoF]Zak - 11.04.2012
If I were you i'd just make it save under OnPlayerDisconnect, and OnGameModeExit too.
Re: Save player account | OnPlayerUpDate or Timer ? -
ReneG - 11.04.2012
If the server is gmx'd in the console while player's are one, their data will be lost. You have to call
via the script for OnGameModeExit option to work.