06.10.2014, 06:02
When I have an updated stats now and then I re joined turns out that I don't have the updated stats I have the normal one.
Codes:
Codes:
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new pName2[24];
new str[128];
GetPlayerName(playerid, pName2, 24);
switch(reason)
{
case 0: format(str, 128, "%s (%d) Has Left The Server. (Timeout/Crashed)", pName2,playerid);
case 1: format(str, 128, "%s (%d) Has Left The Server. (Leaving)", pName2,playerid);
case 2: format(str, 128, "%s (%d) Has Left The Server. (Kicked/Banned)", pName2,playerid);
}
SendClientMessageToAll(0xAFAFAFAA, str);
if(fexist(UserPath(playerid)))
{
if(Info[playerid][Logged] == 1)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",PlayerInfo[playerid][pPass]);
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,"Score",GetPlayerScore(playerid));
INI_WriteInt(File,"Drugs",LPinfo[playerid][Drugs]);
INI_WriteInt(File,"Adrenaline",LPinfo[playerid][Adre]);
INI_WriteInt(File,"Registered",1);
INI_WriteInt(File,"Logged",0);
INI_WriteInt(File,"VIPLevel",Info[playerid][VIPLevel]);
INI_WriteInt(File,"FavouriteSkin",Info[playerid][Favouriteskin]);
INI_WriteInt(File,"FavouriteSong",Favouritesong[playerid]);
INI_WriteInt(File,"BankMoney",BankMoney[playerid]);
INI_WriteInt(File,"Daysalive",Daysalive[playerid]);
INI_WriteInt(File,"Banned",Info[playerid][Banned]);
INI_WriteInt(File,"MissionsCompleted",Info[playerid][MissionsCompleted]);
INI_WriteInt(File,"MissionsFailed",Info[playerid][MissionsFailed]);
INI_WriteInt(File,"Robbed",Info[playerid][Robbed]);
INI_WriteInt(File,"MaximumRobbed",Info[playerid][MaximumRobbed]);
INI_WriteInt(File,"Muted",Info[playerid][Muted]);
INI_WriteInt(File,"Jailed",Info[playerid][Jailed]);
INI_WriteInt(File,"MuteWarnings",Info[playerid][MuteWarnings]);
INI_WriteInt(File,"MaxMuteWarnings",Info[playerid][MaxMuteWarnings]);
INI_WriteInt(File,"Warnings",Info[playerid][Warnings]);
INI_WriteInt(File,"TimesKicked",Info[playerid][TimesKicked]);
INI_WriteInt(File,"EventsWon",Info[playerid][EventsWon]);
INI_WriteInt(File,"EventsLost",Info[playerid][EventsLost]);
INI_WriteInt(File,"StartingMusic",Info[playerid][StartingMusic]);
INI_Close(File);
}
}
return 1;
}