Help again
#7

I have playerdisconnect() function it saves almost everything fine after logout but not money skin id my saveplayerdata() function
PHP код:
stock SavePlayerData(playerid)
{
    new 
Query[2500], Querys[700], iFloatP_HealthFloatP_ArmourFloatXFloatYFloatZWeapons[13][2];
    
GetPlayerPos   (playeridXYZ);
    
GetPlayerHealth(playeridP_Health);
    
GetPlayerArmour(playeridP_Armour);
    
mysql_format(DbHandle,Queryssizeof(Querys), "UPDATE ServerPlayers SET AdminLevel = %d, AdminDaysLeft = %d, Pos_X = %f, Pos_Y = %f,\
    Pos_Z = %f, Interior = %d, VirtualWorld = %d, Experience = %d, Money = %f, Gender = %d, Skin = %d, \
    AutoLoginPlayer = %d, Online = 0, Health = %f, Armour = %f, VIPLevel = %d, VIPDaysLeft = %d, CitySelection = %i WHERE User = '%e'"
,
    
AccountInfo[playerid][AdminLevel], AccountInfo[playerid][AdminDaysLeft], XYZGetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid), AccountInfo[playerid][Experience], AccountInfo[playerid][MoneyHave], AccountInfo[playerid][Gender], AccountInfo[playerid][Skin], AccountInfo[playerid][AutoLoginPlayer], P_HealthP_ArmourAccountInfo[playerid][VIPLevel], AccountInfo[playerid][VIPDaysLeft], AccountInfo[playerid][CitySelection], PlayerNameEx(playerid));
    
mysql_pquery(DbHandle,Querys,"","");
    
format(Querysizeof(Query), "UPDATE ServerPlayers SET ");
    for(
0MAX_INVENTORY_SLOTS++)
    {
        
format(Queryssizeof(Querys), "InventoryItemID_%d = %d,"iInventorySystem[playerid][i][ItemID]);
        
strcat(QueryQuerys);
        
format(Queryssizeof(Querys), "InventoryItemAmmount_%d = %d,"iInventorySystem[playerid][i][ItemAmmount]);
        
strcat(QueryQuerys);
    }
    for(
013++)
    {
        
GetPlayerWeaponData(playeridiWeapons[i][0], Weapons[i][1]);
        
format(Queryssizeof(Querys), "WeaponID_%d = %d,"iWeapons[i][0]);
        
strcat(QueryQuerys);
        
format(Queryssizeof(Querys), "WeaponAmmo_%d = %d,"iWeapons[i][1]);
        
strcat(QueryQuerys);
    }
    
Query[strlen(Query)-1] = ' ';
    
mysql_format(DbHandle,Queryssizeof(Querys), " WHERE User = '%e'"PlayerNameEx(playerid));
    
strcat(QueryQuerys);
    
mysql_pquery(DbHandle,Query,"","");
    
mysql_format(DbHandle,Queryssizeof(Querys), "UPDATE ServerPlayers SET TelphoneOn = %d, TelphoneBill = %f, TelphoneNumber = %d, TrationChannel = %d, MoneyInBank = %f, HaveBankAccount = %d, EnteredHouseID = %d, TelphoneContract = %d, TelphoneType = %d, MoneyInTelphone = %f, FuelInFuelTank = %f, FuelTypeInTank = %d WHERE User = '%e'",
    
AccountInfo[playerid][TelphoneOn], AccountInfo[playerid][TelphoneBill], AccountInfo[playerid][TelphoneNumber], AccountInfo[playerid][TrationChannel], AccountInfo[playerid][MoneyInBank], AccountInfo[playerid][HaveBankAccount], AccountInfo[playerid][EnteredHouseID], AccountInfo[playerid][TelphoneContract],
        
AccountInfo[playerid][TelphoneType], AccountInfo[playerid][MoneyInTelphone], AccountInfo[playerid][FuelInFuelTank], AccountInfo[playerid][FuelTypeInTank], PlayerNameEx(playerid));
    
mysql_pquery(DbHandle,Querys,"","");
    
mysql_format(DbHandle,Queryssizeof(Querys), "UPDATE ServerPlayers SET Job = %d, JobPayBonus = %f, JobMinimalPay = %f, MustJobContract = %d, WorkTimeInJob = %d, JobRank = %d, JobWarns = %d, JobLeadID = %d, JobLeadAsistant = %d, JobSkin = %d, WearJobSkin = %d, JailedSeconds = %d, Warns = %d, HaveCategorysLicense = %d, HaveWeaponLicense = %d, HaveBCategoryLicense = %d WHERE User = '%e'",
        
AccountInfo[playerid][Job], AccountInfo[playerid][JobPayBonus], AccountInfo[playerid][JobMinimalPay], AccountInfo[playerid][MustJobContract], AccountInfo[playerid][WorkTimeInJob], AccountInfo[playerid][JobRank], AccountInfo[playerid][JobWarns], AccountInfo[playerid][JobLeadID], AccountInfo[playerid][JobLeadAsistant], AccountInfo[playerid][JobSkin], AccountInfo[playerid][WearJobSkin], AccountInfo[playerid][JailSeconds], AccountInfo[playerid][Warns],
        
AccountInfo[playerid][HaveCategorysLicense], AccountInfo[playerid][HaveWeaponLicense], AccountInfo[playerid][HaveBCategoryLicense], PlayerNameEx(playerid));
    
mysql_pquery(DbHandle,Querys,"","");
    
mysql_format(DbHandle,Queryssizeof(Querys), "UPDATE ServerPlayers SET HaveCigarettes = %d, LeftGas = %d, CheatWarns = %d, HaveACategoryLicense = %d, HaveGlassesOn = %d, CrimeLevel = %d, HaveCredits = %d, Cuffed = %d, gMember = %d, PlayerEmail = '%e', AdminWarns = %d, MutedMinutes = %d, WeaponsSkillProc = %d, TimeWorkingInJob = %d, JobLastLoginDay = %d WHERE User = '%e'",
        
AccountInfo[playerid][HaveCigarettes], AccountInfo[playerid][LeftGas], AccountInfo[playerid][CheatWarns], AccountInfo[playerid][HaveACategoryLicense], AccountInfo[playerid][HaveGlassesOn], GetPlayerTWanted(playerid), AccountInfo[playerid][HaveCredits],
        
Cuffed[playerid], AccountInfo[playerid][gMember], AccountInfo[playerid][PlayerEmail], AccountInfo[playerid][AdminWarns], AntiCheatSystem[playerid][MutedMinutes], AccountInfo[playerid][WeaponsSkillProc], AccountInfo[playerid][TimeWorkingInJob], AccountInfo[playerid][JobLastLoginDay], PlayerNameEx(playerid));
    
mysql_pquery(DbHandle,Querys,"","");
    
    
    
mysql_format(DbHandle,Queryssizeof(Querys), "UPDATE ServerPlayers SET AlreadyPicketPay = %d, HaveSpecialJobAbility = %d, LoginWithOneIP = %d, HaveTaxiLicense = %d WHERE User = '%e'"AccountInfo[playerid][AlreadyPicketPay], AccountInfo[playerid][HaveSpecialJobAbility], AccountInfo[playerid][LoginWithOneIP], AccountInfo[playerid][HaveTaxiLicense], PlayerNameEx(playerid));
    
mysql_pquery(DbHandle,Querys,"",""); 
Reply


Messages In This Thread
Help again - by isorinis - 12.08.2017, 20:05
Re: Help again - by StefaNO [ITA] - 12.08.2017, 20:08
Re: Help again - by R4nd4ll - 12.08.2017, 20:16
Re: Help again - by isorinis - 13.08.2017, 14:41
Re: Help again - by isorinis - 14.08.2017, 11:50
Re: Help again - by 10MIN - 14.08.2017, 14:17
Re: Help again - by isorinis - 14.08.2017, 15:39
Re: Help again - by isorinis - 14.08.2017, 15:50

Forum Jump:


Users browsing this thread: 2 Guest(s)