if(!strcmp(action, "park", false))
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "/v park command is currently disabled");
for(new i=0;i<sizeof(Car);i++)
{
if(IsPlayerInVehicle(playerid, Car[i][c_id]+1))
{
new m[126];
format(m, sizeof(m), "Car parked successfully.", Car[i][c_id]);
new query[512];
format(query, sizeof(query), "UPDATE cars SET c_x='%f', c_y='%f', c_z='%f', c_a='%f' WHERE id='%i'", Car[i][c_x],Car[i][c_y],Car[i][c_z],Car[i][c_a],Car[i][c_id]);
mysql_function_query(dbhandle, query, false, "", "");
SendClientMessage(playerid, -1, m);
return 1;
}
}
}
print(query);
if(IsPlayerInVehicle(playerid, Car[i][c_id]+1)) { new m[126]; format(m, sizeof(m), "Car parked successfully.", Car[i][c_id]);
GetVehiclePos(Car[i][c_id],Car[i][c_x],Car[i][c_y],Car[i][c_z]);
GetVehicleZAngle(Car[i][c_id],Car[i][c_a]);
format(query, sizeof(query), "UPDATE cars SET c_x='%f', c_y='%f', c_z='%f', c_a='%f' WHERE id='%i'", Car[i][c_x],Car[i][c_y],Car[i][c_z],Car[i][c_a],Car[i][c_id]);
Your position variable arent updated
PHP код:
|