23.08.2012, 17:06
pawn Код:
forward SavePlayerStats(targetid);
public SavePlayerStats(targetid)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_WriteInt(File,"Starter",PlayerInfo[playerid][pStarter]);
INI_WriteInt(File,"Zombie",PlayerInfo[playerid][pZombie]);
INI_WriteInt(File,"Score",GetPlayerScore(playerid));
INI_Close(File);
/*new str[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "%s got his account saved successfuly.", name);
SendClientMessageToAll(0x4958761, str);*/
print("\n----------------------------------");
print(" Players' accounts saved! On SavePlayerStats");
print("----------------------------------\n");
return 1;
}
You can keep the original one and use SavePlayerStats(ANYINTVARIABLE);
You can replace ANYINTVARIABLE with any playerid variable, no need to modify or duplicate the original function.