Need help with Stats Saving.
#2

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new string[64], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    format(string,sizeof string,"%s left from server!",pName);
    SendClientMessageToAll(COLOR_GREY,string);
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
    INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
    INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
    INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
    INI_WriteInt(File,"Cookies",PlayerInfo[playerid][pCookies]);
   INI_Close(File); //Close the file
    return 1;
}
Reply


Messages In This Thread
Need help with Stats Saving. - by Majava - 26.10.2012, 07:02
Re: Need help with Stats Saving. - by newbienoob - 26.10.2012, 07:07
Re: Need help with Stats Saving. - by Majava - 26.10.2012, 07:12

Forum Jump:


Users browsing this thread: 1 Guest(s)