01.06.2016, 11:00
title.
code:
also; i get this mysql error:
[13:00:29] [ERROR] CMySQLQuery::Execute[()] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VALUES (1529.757690,-1729.473754,13.009142,207.501159) WHERE id='0'' at line 1
code:
pawn Код:
else if(!strcmp(tmp, "park", true, 4))
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientError(playerid, "You are not in any vehicle!");
if(GetAdminLevel(playerid) < 5) return SendClientError(playerid, CANT_USE_CMD);
new Float:a[4];
GetVehiclePos(GetPlayerVehicleID(playerid), a[0], a[1], a[2]);
GetVehicleZAngle(GetPlayerVehicleID(playerid), a[3]);
new query[420];
new i = GetPlayerVehicleID(playerid);
format(query,sizeof(query),"UPDATE (x,y,z,a) VALUES (%f,%f,%f,%f) WHERE id='%i'",a[0],a[1],a[2],a[3],cInfo[i][db_id]);
mysql_function_query(dbhandle,query,false,"","");
cInfo[i][c_x] = a[0];
cInfo[i][c_y] = a[1];
cInfo[i][c_z] = a[2];
cInfo[i][c_r] = a[3];
ReloadVehicle(GetPlayerVehicleID(playerid));
Up(playerid);
SetTimerEx("PutPlayerInVehicleEx", 500, false, "dd", playerid, i);
SendClientInfo(playerid, "Success: The vehicle is now parked.");
}
[13:00:29] [ERROR] CMySQLQuery::Execute[()] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VALUES (1529.757690,-1729.473754,13.009142,207.501159) WHERE id='0'' at line 1