02.12.2012, 06:21
Getty use this code! This will work fine for you!! We gotta format two strings and strcat these two strings together.
pawn Код:
new Query2[200]
format(Query, sizeof(Query), "UPDATE `PlayerVehicles` SET `Mod1`='%d', `Mod2`='%d', `Mod3`='%d', `Mod4`='%d', `Mod5`='%d', `Mod6`='%d', `Mod7`='%d', `Mod8`='%d', `Mod9`='%d', `Mod10`='%d'",
Vehicles[iVehicleID][mod1],
Vehicles[iVehicleID][mod2],
Vehicles[iVehicleID][mod3],
Vehicles[iVehicleID][mod4],
Vehicles[iVehicleID][mod5],
Vehicles[iVehicleID][mod6],
Vehicles[iVehicleID][mod7],
Vehicles[iVehicleID][mod8],
Vehicles[iVehicleID][mod9],
Vehicles[iVehicleID][mod10]);
format(Query2,sizeof(Query2),"`Mod11` = '%d', `Mod12`='%d', `Mod13`='%d', `Mod14`='%d', `Mod15`='%d', `Mod16`='%d', `Mod17`= '%d' WHERE `OwnedVehicleID` = %d LIMIT 1",
Vehicles[iVehicleID][mod11],
Vehicles[iVehicleID][mod12],
Vehicles[iVehicleID][mod13],
Vehicles[iVehicleID][mod14],
Vehicles[iVehicleID][mod15],
Vehicles[iVehicleID][mod16],
Vehicles[iVehicleID][mod17],
iVehicleID);
strcat(Query,Query2);
mysql_query(Query);