PHP код:
public OnPlayerDisconnect(playerid, reason) {
new str[1024];
GetPlayerName(playerid,NAME,25);
format(str,sizeof(str),"UPDATE `players` SET `Money=%d,CurrentHealth=%d,Level=%d,HouseKey=%d,BizKey=%d,Cigarettes=%d,Rope=%d,HasGlasses=%d,Skin=%d,CurrentX=%d,CurrentY=%d,",
PlayerAccount[playerid][Money],PlayerAccount[playerid][Health],PlayerAccount[playerid][Level],PlayerAccount[playerid][HouseKey],PlayerAccount[playerid][BizKey],PlayerAccount[playerid][Cigarettes],PlayerAccount[playerid][Rope],PlayerAccount[playerid][HasGlasses],PlayerAccount[playerid][Skin],PlayerAccount[playerid][pPos][0],PlayerAccount[playerid][pPos][1]);
format(str,sizeof(str),"%sCurrentZ=%d,CurrentInt=%d,CurrentVW=%d,ID=%d,HasMask=%d,HasHelmet=%d,PhoneCredit=%d,CurrentArmour=%d,Sex=%d,Drug=%d,Materials=%d,FightStyle=%d,",str,
PlayerAccount[playerid][pPos][2],PlayerAccount[playerid][CurrentInt],PlayerAccount[playerid][CurrentVW],PlayerAccount[playerid][ID],PlayerAccount[playerid][HasMask],PlayerAccount[playerid][HasHelmet],PlayerAccount[playerid][PhoneCredit],AccountData[playerid][pArmour],PlayerAccount[playerid][psex],PlayerAccount[playerid][Drug],PlayerAccount[playerid][Materials],PlayerAccount[playerid][FightStyle]);
format(str,sizeof(str),"%sWalk=%d,Premium=%d,WalkieTalkie=%d,Phone=%d,Clan=%d,ClanLeader=%d,Faction=%d,CurrentDuty=%d,Rank=%d,CurrentDutySkin=%d,Subfaction=%d,",str,
PlayerAccount[playerid][Walk],PlayerAccount[playerid][Premium],PlayerAccount[playerid][WalkieTalkie],PlayerAccount[playerid][Phone],PlayerAccount[playerid][Clan],PlayerAccount[playerid][ClanLeader],PlayerAccount[playerid][Faction],PlayerAccount[playerid][CurrentDuty],PlayerAccount[playerid][Rank],PlayerAccount[playerid][CurrentDutySkin],PlayerAccount[playerid][Subfaction]);
format(str,sizeof(str),"%sBank=%d,Prestito=%d,Pay=%d,Jailed=%d,JailTime=%d,JailCell=%d,Exp=%d,Years=%d,Pills=%d,TutorialDone=%d,Admin=%d,Banned=%d,GPS=%d,",str,
PlayerAccount[playerid][Bank],PlayerAccount[playerid][Prestito],PlayerAccount[playerid][Pay],PlayerAccount[playerid][Jailed],PlayerAccount[playerid][JailCell],PlayerAccount[playerid][JailTime],PlayerAccount[playerid][Exp],PlayerAccount[playerid][Years],PlayerAccount[playerid][Pills],PlayerAccount[playerid][TutorialDone],PlayerAccount[playerid][AdminLevel],PlayerAccount[playerid][Banned],PlayerAccount[playerid][GPS]);
format(str,sizeof(str),"%sClock=%d,Poste=%d,Worker=%d,Capelli=%d,Helper=%d,Spawned=%d,",str,
PlayerAccount[playerid][Clock],PlayerAccount[playerid][Poste],PlayerAccount[playerid][Worker],PlayerAccount[playerid][Capelli],PlayerAccount[playerid][Helper],PlayerAccount[playerid][License][0],PlayerAccount[playerid][License][1],PlayerAccount[playerid][License][2],PlayerAccount[playerid][License][3],PlayerAccount[playerid][License][4],PlayerAccount[playerid][License][5],PlayerAccount[playerid][Spawned]);
format(str,sizeof(str),"%s WHERE `name`='%s';",str,NAME);