18.05.2014, 04:14
pawn Код:
public OnPlayerDisconnect( playerid )
{
if(playerid!=INVALID_PLAYER_ID)
{
if( GetPVarInt( playerid, "pLog" ) == 1 )
{
new file[ 256 ]; format( file, sizeof file, DIRECTORY, pName( playerid ) );
new INI:PlayerAcc = INI_Open( file );
INI_WriteInt( PlayerAcc, "Money", GetPlayerMoney( playerid ) );
INI_WriteInt( PlayerAcc, "Score", GetPlayerScore( playerid ) );
INI_Close( PlayerAcc );
SetPVarInt( playerid, "pLog", 0 );
}
}
return ( 1 );
}