10.08.2018, 06:52
You have a lot of syntax errors as GRiMMREAPER says and you can't use specifiers as Jefff saiys, the way to do it is combined of GRiMMREAPER and Jefff ideas, you have to format it first and after that you have to connect them together into another string variable using "strcat" function. Try that:
PHP код:
UpdatePlayerData(playerid)
{
if(Player[playerid][IsLoggedIn] == false) return 0;
new query[4096];
new query2[4096];
format(query, sizeof(query), "UPDATE `players` SET `LastLogin` = '%s', `Kills` = '%d', `Deaths` = '%d', `Score` = '%i', `Money` = '%i', `Level` = '%d', `WantedLevel` = '%d', `Skin` = '%d', `PlayerTeam` = '%d', `PlayerGender` = '%d',",
ReturnDate(),
Player[playerid][Kills],
Player[playerid][Deaths],
GetPlayerScore(playerid),
GetPlayerMoney(playerid),
Player[playerid][Level],
GetPlayerWantedLevel(playerid),
GetPlayerSkin(playerid),
GetPlayerTeam(playerid),
Player[playerid][PlayerGender]);
strcat(query2, query);
format(query, sizeof(query), "`PlayingHours` = '%d', `PlayingMinutes` = '%d', `FirstSpawn` = '%d', `Job` = '%d', `Bank` = '%d', `NoPm` = '%d', `Diseases` = '%d',",
Player[playerid][PlayingHours],
Player[playerid][PlayingMinutes],
Player[playerid][FirstSpawn],
Player[playerid][Job],
Player[playerid][Bank],
Player[playerid][NoPm],
Player[playerid][Diseases]);
strcat(query2, query);
format(query, sizeof(query), "`VehicleLicense` = '%d', `MotorbikeLicense` = '%d', `PlaneLicense` = '%d', `HelicopterLicense` = '%d', `BankDeposited` = '%d', `BankWithdrawal` = '%d' WHERE `ID`= '%d'",
Player[playerid][VehicleLicense],
Player[playerid][MotorbikeLicense],
Player[playerid][PlaneLicense],
Player[playerid][HelicopterLicense],
Player[playerid][BankDeposited],
Player[playerid][BankWithdrawal],
Player[playerid][ID]);
strcat(query2, query);
mysql_tquery(g_SQL, query2);
return 1;
}