08.05.2013, 19:14
Each time you format a string, you delete what was in it before. Try this:
It should work perfectly!
P.S: you were saving Faction Rank twice.
Also, don't use the methods below where the guy uses mysql_query four times, it's bad. It's very unnecessary. All you need to do is append the continuation to the string each time you reformat. See how I do it above. After that, you only need to use mysql_query once.
pawn Код:
new string[1000];
format(string, sizeof(string), "UPDATE Users SET Password='%s',Admin='%d',Money='%d', VIP='%d'", PlayerInfo[playerid][Password], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pCash], PlayerInfo[playerid][pDonateRank]);
format(string, sizeof(string), "%s, Banned='%d', Warnings='%d', Kills='%d', Deaths='%d'", string, PlayerInfo[playerid][pBanned], PlayerInfo[playerid][pWarns], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths];
format(string, sizeof(string), "%s, AdminDuty='%d', FactionMember='%d', FactionRank='%d'", string, PlayerInfo[playerid][aDuty], PlayerInfo[playerid][pMember], PlayerInfo[playerid][pRank]);
format(string, sizeof(string), "%s, Level='%d', Exp='%d' WHERE Name='%s'", string, PlayerInfo[playerid][Level], PlayerInfo[playerid][Exp], PlayerInfo[playerid][pMember], PlayerInfo[playerid][Name]);
mysql_query(string);
P.S: you were saving Faction Rank twice.
Also, don't use the methods below where the guy uses mysql_query four times, it's bad. It's very unnecessary. All you need to do is append the continuation to the string each time you reformat. See how I do it above. After that, you only need to use mysql_query once.