04.04.2016, 22:00
You don't seem to use EasyDB well. There are lot of areas where you still are performing DB::Query where it could be easily done with EasyDB functions.
Example
Your code:
My code:
Example
Your code:
pawn Code:
stock UpdatePlayerVehicle(playerid, vehicleid)
{
new query[256], dbid = vInfo[vehicleid][dbID];
format(query, sizeof query, "UPDATE `Vehicles` SET PosX = '%f', PosY = '%f',PosZ = '%f', Angle='%f' WHERE id='%d'",
vInfo[vehicleid][vPos_X], vInfo[vehicleid][vPos_Y], vInfo[vehicleid][vPos_Z], vInfo[vehicleid][vAngle], dbid);
DB::Query(query, false);
printf("Vehicle ID %d has been saved. [%s vehicle]", vehicleid, GetName(playerid));
return 1;
}
pawn Code:
stock UpdatePlayerVehicle(playerid, vehicleid)
{
DB::MultiSet(vTable, vInfo[vehicleid][dbID], "ffff", "PosX", vInfo[vehicleid][vPos_X], "PosY", vInfo[vehicleid][vPos_Y], "PosZ", vInfo[vehicleid][vPos_Z], "Angle", vInfo[vehicleid][vAngle]);
printf("Vehicle ID %d has been saved. [%s vehicle]", vehicleid, GetName(playerid));
return 1;
}