pawn Код:
forward SavePlayerData(playerid);
public SavePlayerData(playerid)
{
new query[700];
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
format(query, 700, "UPDATE `players` SET `Origin` = '%d', `Sex` = '%d', `FirstLogin` = '%d', `Staff` = '%d' WHERE `username` ='%s' ", AccountInfo[playerid][pOrigin], AccountInfo[playerid][pSex], AccountInfo[playerid][pFirstLogin], AccountInfo[playerid][pStaff], ReturnName(playerid));
mysql_query(query);
format(query, 700, "UPDATE `players` SET `Mapper` = '%d', `PosX` = '%f', `PosY` = '%f', `PosZ` = '%f' WHERE `username` ='%s' ", AccountInfo[playerid][pMapper], x, y, z, ReturnName(playerid));
mysql_query(query);
format(query, 700, "UPDATE `players` SET `Interior` = '%d', `SavePos` = '%d',`Member` = '%d' WHERE `username` ='%s' ", GetPlayerInterior(playerid), AccountInfo[playerid][pSavePos], AccountInfo[playerid][pMember], ReturnName(playerid));
mysql_query(query);
format(query, 700, "UPDATE `players` SET `Rank` = '%d', `Bani` = '%d', `Warns` = '%d', `Age` = '%d' WHERE `username` ='%s' ", AccountInfo[playerid][pRank], AccountInfo[playerid][pBani], AccountInfo[playerid][pWarns], AccountInfo[playerid][pAge], ReturnName(playerid));
mysql_query(query);
format(query, 700, "UPDATE `players` SET `CarLic` = '%d', `FlyLic` = '%d', `BoatLic` = '%d', `GunLic` = '%d' WHERE `username` ='%s' ", AccountInfo[playerid][pCarLic], AccountInfo[playerid][pFlyLic], AccountInfo[playerid][pBoatLic], AccountInfo[playerid][pGunLic], ReturnName(playerid));
mysql_query(query);
format(query, 700, "UPDATE `players` SET `AccesDMV` = '%d', `UpgradeAge` = '%d', `Skin` = '%d', `Bilet` = '%d' WHERE `username` ='%s' ", AccountInfo[playerid][pAccesDMV], AccountInfo[playerid][pUpgradeAge], AccountInfo[playerid][pSkin], AccountInfo[playerid][pBilet], ReturnName(playerid));
mysql_query(query);
format(query, 700, "UPDATE `players` SET `Ban` = '%d', `Job` = '%d', `JobEchipat` = '%d', `JobFinish` = '%d' WHERE `username` ='%s' ", AccountInfo[playerid][pBan], AccountInfo[playerid][pJob], AccountInfo[playerid][pJobEchipat], AccountInfo[playerid][pJobFinish], ReturnName(playerid));
mysql_query(query);
format(query, 700, "UPDATE `players` SET `JobPlata` = '%d', `JobTimed` = '%d', `JobTime` = '%d', `World` = '%d' WHERE `username` ='%s' ", AccountInfo[playerid][pJobPlata], AccountInfo[playerid][pJobTimed], AccountInfo[playerid][pJobTime], AccountInfo[playerid][pWorld], ReturnName(playerid));
mysql_query(query);
format(query, 700, "UPDATE `players` SET `Muted` = '%d', `MuteTime` = '%d', `AmmuTrainTime` = '%d', `PistSkill` = '%d' WHERE `username` ='%s' ", AccountInfo[playerid][pMuted], AccountInfo[playerid][pMuteTime], AccountInfo[playerid][pAmmuTrainTime], AccountInfo[playerid][pPistSkill], ReturnName(playerid));
mysql_query(query);
format(query, 700, "UPDATE `players` SET `SilenSkill` = '%d', `DesertSkill` = '%d', `ShotgSkill` = '%d', `SmgSkill` = '%d' WHERE `username` ='%s' ", AccountInfo[playerid][pSilenSkill], AccountInfo[playerid][pDesertSkill], AccountInfo[playerid][pShotgSkill], AccountInfo[playerid][pSmgSkill], ReturnName(playerid));
mysql_query(query);
format(query, 700, "UPDATE `players` SET `AkSkill` = '%d', `M4Skill` = '%d', `Undite` = '%d', `Rame` = '%d' WHERE `username` ='%s' ", AccountInfo[playerid][pAkSkill], AccountInfo[playerid][pM4Skill], AccountInfo[playerid][pUndite], AccountInfo[playerid][pRame], ReturnName(playerid));
mysql_query(query);
format(query, 700, "UPDATE `players` SET `HouseKey` = '%d', `RentKey` = '%d', `CarKey` = '%d'` WHERE `username` ='%s' ", AccountInfo[playerid][pPhousekey], AccountInfo[playerid][pPrentkey], AccountInfo[playerid][pCarKey], ReturnName(playerid));
mysql_query(query);
format(query, 700, "UPDATE `players` SET `Scoala` = '%d', `Profil` = '%d', `Romana` = '%d', `RT1` = '%d', WHERE `username` ='%s' ", AccountInfo[playerid][pScoala], AccountInfo[playerid][pProfil], AccountInfo[playerid][pRomana], AccountInfo[playerid][pRT1], ReturnName(playerid));
mysql_query(query);
mysql_free_result();
}