09.08.2011, 18:56
Im Using Y_ini To SAve Score And Cash. How Do I Load It?
Here Is OnPlayerDisconnect
Here Is OnPlayerDisconnect
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new PlayerFile[ 13 + MAX_PLAYER_NAME + 1];
format( PlayerFile , sizeof PlayerFile, "%s.ini", Encode(playerName(playerid)));
new INI:PlayerAcc = INI_Open(PlayerFile);
INI_WriteInt(PlayerAcc,"Money",GetPlayerMoney(playerid));
INI_WriteInt(PlayerAcc,"Score",GetPlayerScore(playerid));
INI_WriteInt(PlayerAcc,"Vip",GetPVarInt(playerid, "Vip"));
INI_Close(PlayerAcc);
return 1;
}