26.10.2012, 07:07
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;
}