05.05.2016, 21:28
Hi so, when I am parking my car /carpark, it doesn't update it for some reason, I can't see why
Here's the logs:
Here's the command with the saving part:
It has to be something with that:
Any idea why?
Here's the logs:
PHP код:
[17:32:21] [DEBUG] mysql_format - connection: 1, len: 200, format: "UPDATE `vehicles` SET vX=%f, vY=%f, vZ=%f, vA=%f WHERE ID=%d"
[17:32:21] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `vehicles` SET vX=-1989.818, vY=257.565, vZ=34.771, vA=28", callback: "(null)", format: "(null)"
[17:32:21] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[17:32:21] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 0.220 milliseconds
[17:32:21] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
PHP код:
CMD:carpark(playerid, params[])
{
new Float: x, Float: y, Float: z, Float: a, vehicleid = GetPlayerVehicleID(playerid), query[200];
if(!IsPlayerInAnyVehicle(playerid))
return SendErrorMessage(playerid, "You're not in a vehicle!");
if(Player[playerid][VehSlot1] == vehicleid - 1 || Player[playerid][VehSlot2] == vehicleid - 1)
{
GetVehiclePos(vehicleid, x, y, z);
GetVehicleZAngle(vehicleid, a);
SendInfoMessage(playerid, "You have parked your vehicle.");
mysql_format(mysql, query, sizeof(query), "UPDATE `vehicles` SET vX=%f, vY=%f, vZ=%f, vA=%f WHERE ID=%d", x, y, z, a, vehicleid);
mysql_tquery(mysql, query);
new model = GetVehicleModel(vehicleid);
DestroyVehicle(vehicleid);
CreateVehicle(model, x, y, z, a, Vehicle[vehicleid -1][Color1], Vehicle[vehicleid -1][Color2], -1);
PutPlayerInVehicle(playerid, vehicleid, 0);
}
else return SendErrorMessage(playerid, "You don't own this vehicle!");
return true;
}
PHP код:
[17:32:21] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving