Saving player stats on restart
#1

I was wondering if a foreach statement would efficiently work on saving player stats by ID using threaded queries. Like for example, there are 20 players online and once an admin uses rcon command to restart, it'll save each player by ID. Something like...

Player ID 1 saved then goes to Player ID 2 and saves until it reaches the last player ID online. And after all players are saved, it saves the server stats or dynamics, like houses, businesses, etc., it then triggers the "gmx" after everything is saved.

pawn Код:
foreach(Player, i)
{
    if(IsPlayerConnected(i)) OnPlayerSave(i);
}
Would the code above do the trick or does it save all the players online at the same time?
Reply


Messages In This Thread
Saving player stats on restart - by Eyce - 19.05.2016, 03:06
Re: Saving player stats on restart - by itsCody - 19.05.2016, 03:13
Re: Saving player stats on restart - by Eyce - 19.05.2016, 03:22
Re: Saving player stats on restart - by itsCody - 19.05.2016, 03:30
Re: Saving player stats on restart - by BornHuman - 19.05.2016, 03:32
Re: Saving player stats on restart - by Eyce - 19.05.2016, 03:43
Re: Saving player stats on restart - by MBilal - 19.05.2016, 03:58
Re: Saving player stats on restart - by BornHuman - 19.05.2016, 04:06
Re: Saving player stats on restart - by PrO.GameR - 19.05.2016, 07:03

Forum Jump:


Users browsing this thread: 2 Guest(s)