pawn Код:
stock savePlayer(playerid) {
new szQuery[512];
GetPlayerPos(playerid, Player[playerid][pPos][0], Player[playerid][pPos][1], Player[playerid][pPos][2]);
GetPlayerFacingAngle(playerid, Player[playerid][pPos][3]);
Player[playerid][pInterior] = GetPlayerInterior(playerid);
Player[playerid][pVirtualWorld] = GetPlayerVirtualWorld(playerid);
GetPlayerHealth(playerid, Player[playerid][pHealth]);
GetPlayerArmour(playerid, Player[playerid][pArmour]);
format(szQuery, sizeof(szQuery), "UPDATE players SET Health = '%f', Armour = '%f', PosX = '%f', PosY = '%f', PosZ = '%f', PosR = '%f'", Player[playerid][pHealth], Player[playerid][pArmour], Player[playerid][pPos][0], Player[playerid][pPos][1], Player[playerid][pPos][2], Player[playerid][pPos][3]);
format(szQuery, sizeof(szQuery), "%s, Interior = %d, Skin = %d, AdminLevel = %d, AName = '%s', Money = %d, BankMoney = %d, VIP = %d, VIPExpires = %d, NMute = %d, VMute = %d, CellPhone = %d, Rags = %d, Rope = %d, Age = %d, Gender = %d, HasSeenTutorial = %d, Job = %d", szQuery,
Player[playerid][pInterior], Player[playerid][pSkin], Player[playerid][AdminLevel], Player[playerid][AName], Player[playerid][Money], Player[playerid][BankMoney], Player[playerid][VIP], Player[playerid][VIPExpires],
Player[playerid][NMute], Player[playerid][VMute], Player[playerid][CellPhone], Player[playerid][Rags], Player[playerid][Rope], Player[playerid][pAge], Player[playerid][Gender], Player[playerid][HasSeenTutorial], Player[playerid][pJob]);
format(szQuery, sizeof(szQuery), "%s, ToySlot1 = %d, ToySlot2 = %d, ToySlot3 = %d, ToySlot1Bone = %d, ToySlot2Bone = %d, ToySlot3Bone = %d, Toy1RotationPosX = '%f', Toy1RotationPosY = '%f', Toy1RotationPosZ = '%f', Toy2RotationPosX = '%f', Toy2RotationPosY = '%f', Toy2RotationPosZ = '%f', Toy3RotationPosX = '%f', Toy3RotationPosY = '%f', Toy3RotationPosZ = '%f'", szQuery,
Player[playerid][ToySlot][0], Player[playerid][ToySlot][1], Player[playerid][ToySlot][2], Player[playerid][ToySlotBone][0], Player[playerid][ToySlotBone][1], Player[playerid][ToySlotBone][2], Player[playerid][ToyRotationPos][0], Player[playerid][ToyRotationPos][1], Player[playerid][ToyRotationPos][2], Player[playerid][ToyRotationPos][3], Player[playerid][ToyRotationPos][4],
Player[playerid][ToyRotationPos][5], Player[playerid][ToyRotationPos][6], Player[playerid][ToyRotationPos][7], Player[playerid][ToyRotationPos][8]);
format(szQuery, sizeof(szQuery), "%s, ToySlot1PosX = %d, ToySlot1PosY = '%f', ToySlot1PosZ = '%f', ToySlot2PosX = '%f', ToySlot2PosY = '%f', ToySlot2PosZ = '%f', ToySlot3PosX = '%f', ToySlot3PosY = '%f', ToySlot3PosZ = '%f', Toy1ScalePosX = '%f', Toy1ScalePosY = '%f', Toy1ScalePosZ = '%f', Toy2ScalePosX = '%f', Toy2ScalePosY = '%f', Toy2ScalePosZ = '%f', Toy3ScalePosX = '%f', Toy3ScalePosY = '%f', Toy3ScalePosZ = '%f' WHERE ID = %d", szQuery,
Player[playerid][ToySlotPos][0], Player[playerid][ToySlotPos][1], Player[playerid][ToySlotPos][2], Player[playerid][ToySlotPos][3], Player[playerid][ToySlotPos][4], Player[playerid][ToySlotPos][5], Player[playerid][ToySlotPos][6], Player[playerid][ToySlotPos][7], Player[playerid][ToySlotPos][8], Player[playerid][ToyScalePos][0], Player[playerid][ToyScalePos][1], Player[playerid][ToyScalePos][2],
Player[playerid][ToyScalePos][3], Player[playerid][ToyScalePos][4], Player[playerid][ToyScalePos][5], Player[playerid][ToyScalePos][6], Player[playerid][ToyScalePos][7], Player[playerid][ToyScalePos][8], Player[playerid][pDBID]);
mysql_query(szQuery, THREAD_NO_RESULT, playerid, iConnectionHandle);
return 1;
}