13.12.2010, 14:51
Hi all,i've this function:
With a forward too.
I need to call this function when server restart,so,before the restart,stats are autosaved.
Code:
public SaveAllStats() { new playername[MAX_PLAYER_NAME]; for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(Registered[i]) { GetPlayerName(i, playername, MAX_PLAYER_NAME); dUserSetINT(playername).("Money",GetPlayerMoney(i)); dUserSetINT(playername).("Kills",pInfo[i][pKills]); dUserSetINT(playername).("Deaths",pInfo[i][pDeaths]); dUserSetINT(playername).("Admin",pInfo[i][pAdmin]); dUserSetINT(playername).("Wantedlvl",GetPlayerWantedLevel(i)); } } } }
I need to call this function when server restart,so,before the restart,stats are autosaved.