- Download the ZIP file and extract it in your resources folder
- Run the SQL file
- Add ensure cx-impound to your server.cfg
Config.TargetBones = {
["bones"] = {
bones = {
"door_dside_f",
"door_dside_r",
"door_pside_f",
"door_pside_r",
'boot',
'rudder',
'rudder2',
'petrolcap',
'petroltank',
'petroltank_l',
'petroltank_r',
},
options = {
{
type = "client",
event = "qb-target:client:vehicleVehicleOptions",
icon = "fas fa-sign-in-alt",
label = "Vehicle options",
},
}
},
}
Config.VehicleInteractions = {
{
requiredJob = "police",
menu = {
header = "Unimpound Vehicle",
txt = "Unimpound the impounded vehicle.",
params = {
event = "cx-impound:client:buyOutData"
}
}
},
{
requiredJob = "police",
menu = {
header = "Impound",
txt = "Impound vehicle.",
params = {
isServer = true,
event = "cx-impound:server:impound",
}
}
},
}
RegisterNetEvent('qb-target:client:vehicleVehicleOptions', function ()
vehicleOptionsMenu()
end)
local function vehicleOptionsMenu()
local playerData = QBCore.Functions.GetPlayerData()
local vehicleInteractions = {
{
header = "Vehicle Options",
isMenuHeader = true,
txt = ""
}
}
for k, v in pairs(Config.VehicleInteractions) do
if v.requiredJob == playerData.job.name or v.requiredJob == 'all' then
vehicleInteractions[#vehicleInteractions + 1] = v.menu
end
end
exports['qb-menu']:openMenu(vehicleInteractions)
end