Quote:
Originally Posted by Glad2BeHere
https://sampforum.blast.hk/showthread.php?tid=273088
pawn Code:
new LoggedIn [MAXPLAYERS ]; onplayerspawn = LoggedIn [playerid ]CMD:gmx (playerid, params []){ foreach (Player, i ) { SaveStats (); LoggedIn [i ] = 0; SendClientMessage (playerid, -1, "SERVER: The server is being restarted."); } SendRconCommand ("gmx"); return 1; }forward SaveStats (); public SaveStats () //this is a shell on how to do it replace playerid with i{Foreach (Player, i ){if(LoggedIn [i ]){// https://sampforum.blast.hk/showthread.php?tid=273088// the disconnect stuff, replace playerid with inew INI:File = INI_Open (UserPath (i )); INI_SetTag (File, "data"); INI_WriteInt (File, "Cash",GetPlayerMoney (i )); INI_WriteInt (File, "Admin",PlayerInfo [i ][pAdmin ]); INI_WriteInt (File, "Kills",PlayerInfo [i ][pKills ]); INI_WriteInt (File, "Deaths",PlayerInfo [i ][pDeaths ]); INI_Close (File ); }return 1; }
|
This is of no help to him. He is using DINI and this is INI.