Hello I would like to have the positions of the vehicle on the database.
I have added the variables but nothing to do can you help me thanks in advance.
Bonjour j’aimerais avoir les positions des véhicule sur la base de données
J’ai rajouté les variable mais rien a faire pouvez vous m’aider merci d’avance
local identifier = identifier
local x, y, z = GetVehicleNodePosition(p0)
local rx, ry, rz = GetEntityRotation(playerPed)
if identifier == nil then
local executed_query = MySQL:executeQuery(“INSERT INTO user_vehicle (identifier
, vehicle_model
, vehicle_plate
, vehicle_state
, veh_x
, veh_y
, veh_z
, veh_rx
, veh_ry
, veh_rz
) VALUES (’@username’, ‘@vehicle’, ‘@plate’, ‘@state’, ‘@veh_x’, ‘@veh_y’, ‘@veh_z’, ‘@veh_rz’, ‘@veh_ry’, ‘@veh_rz’)”,
{[’@username’] = player, [’@vehicle’] = vehicle, [’@plate’] = plate, [’@state’] = state, [’@veh_x’] = x, [’@veh_y’] = y, [’@veh_z’] = z, [’@veh_rx’] = rx, [’@veh_ry’] = ry, [’@veh_rz’] = rz})
else
local executed_query = MySQL:executeQuery(“UPDATE user_vehicle SET vehicle_model
=’@vehicle’, vehicle_plate
= ‘@plate’, vehicle_state
=’@state’ WHERE identifier = ‘@username’”,
{[’@username’] = player, [’@vehicle’] = vehicle, [’@plate’] = plate, [’@state’] = state})
end