05.09.2013, 08:41
How to fix that, when random ppl register he has max lv admin...
public OnPlayerDisconnect(playerid, reason)
{
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_Close(File);
PlayerInfo[playerid][pAdmin] = 0;
PlayerInfo[playerid][pKills] = 0;
PlayerInfo[playerid][pDeaths] = 0;
return 1;
}
Do you reset stats after saving them?
pawn Код:
|
I have same problem and this is not solution. Any idea? New registered people still getting stats of last connected player... I am so crazy, cant solve it so long!
|
public OnPlayerConnect(playerid) {
// Reset them here ...
// Rest of your code
return 1;
}