06.01.2014, 21:23
Код:
stock SavePlayer(playerid) { if(GetPlayerSkin(playerid) != PlayerInfo[playerid][Skin]) { if(OSkin[playerid] != -1) { new save[300]; format(save, sizeof(save), "UPDATE `Accounts` SET Level = %d,Cash = %d,Locker = %d,Staff = %d,Supporter = %d,Skin = %d WHERE Username = '%s'", GetPlayerScore(playerid), PlayerInfo[playerid][Cash], PlayerInfo[playerid][Locker], PlayerInfo[playerid][Staff], PlayerInfo[playerid][Supporter], OSkin[playerid], pName(playerid)); } else { PlayerInfo[playerid][Skin] = GetPlayerSkin(playerid); } } new save[300]; format(save, sizeof(save), "UPDATE `Accounts` SET Level = %d,Cash = %d,Locker = %d,Staff = %d,Supporter = %d,Skin = %d WHERE Username = '%s'", GetPlayerScore(playerid), PlayerInfo[playerid][Cash], PlayerInfo[playerid][Locker], PlayerInfo[playerid][Staff], PlayerInfo[playerid][Supporter], PlayerInfo[playerid][Skin], pName(playerid)); mysql_query(save); GetPlayerPos(playerid,PlayerInfo[playerid][Posx], PlayerInfo[playerid][Posy], PlayerInfo[playerid][Posz]); format(save, sizeof(save), "UPDATE `Accounts` SET Posx = %f,Posy = %f,Posz = %f,World = %d,Interior = %d, Jails = %d, Banned = %d, Bans = %d, Muted = %d WHERE Username = '%s'", PlayerInfo[playerid][Posx], PlayerInfo[playerid][Posy], PlayerInfo[playerid][Posz], GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), PlayerInfo[playerid][Jails], PlayerInfo[playerid][Banned], PlayerInfo[playerid][Bans], PlayerInfo[playerid][Muted], pName(playerid)); mysql_query(save); format(save, sizeof(save), "UPDATE `Accounts` SET Faction = %d,Rank = %d,Job = %d,GarbageMan = %d,FoodSupplier = %d,LaundryWorker = %d,House = %d,Dice = %d,Cigarettes = %d,Lighter = %d WHERE Username = '%s'", PlayerInfo[playerid][Faction], PlayerInfo[playerid][Rank], PlayerInfo[playerid][Job], PlayerInfo[playerid][GarbageMan], PlayerInfo[playerid][LaundryWorker], PlayerInfo[playerid][FoodSupplier], PlayerInfo[playerid][House], PlayerInfo[playerid][Dice], PlayerInfo[playerid][Cigarettes], PlayerInfo[playerid][Lighter], pName(playerid)); mysql_query(save); format(save, sizeof(save), "UPDATE `Accounts` SET Boombox = %d,WeaponSlot = %d,Isolated = %d,IsolatedTime = %d,Jailed = %d,JailedTime = %d,Pen = %d,Paper = %d,Note = '%s' WHERE Username = '%s'", PlayerInfo[playerid][Boombox], PlayerInfo[playerid][WeaponSlot], PlayerInfo[playerid][Isolated], PlayerInfo[playerid][IsolatedTime], PlayerInfo[playerid][Jailed], PlayerInfo[playerid][JailedTime], PlayerInfo[playerid][Pen], PlayerInfo[playerid][Paper], PlayerInfo[playerid][Note], pName(playerid)); mysql_query(save); format(save, sizeof(save), "UPDATE `Accounts` SET Strenght = %d,Stamina = %d,Basketball = %d WHERE Username = '%s'", PlayerInfo[playerid][Strenght], PlayerInfo[playerid][Stamina], PlayerInfo[playerid][Basketball], pName(playerid)); mysql_query(save); return 1; }
Detailed error description:
Accounts get confused when saving, some are saved under others, also, some are saved as 0.0000.
Anyone?