So i wanted PD to be able to shoot from vehicles if needed, but with ONX vehicles they couldn't, due to the spotlight being registered as a weapon. So i messed a bit with inventory to allow you to use inventory weapons too.
Now this isnt 100% how i want it cause i want to be able to use the spotlight and a weapon, and this works until you pull the weapon then you lose ability to move the spotlight until you swap seats or get out and back in
but anyways this is what i did
ox_inventory/client.lua find this:
if seat then
local hasWeapon = GetCurrentPedVehicleWeapon(cache.ped)
if hasWeapon then
return Utils.WeaponWheel(true)
end
end
Utils.WeaponWheel(false)
end)```
replace it with this
```lib.onCache('seat', function(seat)
if seat then
local hasWeapon = GetCurrentPedVehicleWeapon(cache.ped)
if hasWeapon then
-- Check if current vehicle model should be excluded
local vehicle = cache.vehicle
local model = GetEntityModel(vehicle)
-- All ONX police vehicles with spotlights
local spotlightVehicles = {
[`onx_polalamo`] = true,
[`onx_polgrang`] = true,
[`onx_polgrang2`] = true,
[`onx_polmerit`] = true,
[`onx_polmerit3`] = true,
[`onx_poltulip`] = true,
[`onx_polvigero`] = true,
[`onx_polaleu`] = true,
[`onx_polcara`] = true,
[`onx_poldom`] = true,
[`onx_polmonar`] = true,
[`onx_polsand`] = true,
[`onx_polsandsc`] = true,
[`onx_polsandxl`] = true,
[`onx_polsandh`] = true,
[`onx_polscout`] = true,
[`onx_polscout2`] = true,
[`onx_poltavros`] = true,
[`onx_polbison4`] = true,
[`onx_polbison`] = true,
[`onx_polbison2`] = true,
[`onx_polbison3`] = true,
[`onx_polbuff`] = true,
[`onx_polbuffhf`] = true,
[`onx_poldorado2`] = true,
[`onx_poldorado`] = true,
[`onx_polgaunt`] = true,
[`onx_polcava`] = true,
[`onx_polvstr`] = true,
[`onx_polcon`] = true,
[`onx_polkandra`] = true,
[`onx_polinvict`] = true,
[`onx_polinvict2`] = true,
[`onx_polsem`] = true,
[`onx_polterm`] = true,
[`onx_polterm2`] = true,
[`onx_polregent`] = true,
[`onx_polregentxl`] = true,
[`onx_polstalk`] = true,
[`onx_polverus`] = true,
}
-- Only enable weapon wheel if it's NOT a spotlight vehicle
if not spotlightVehicles[model] then
return Utils.WeaponWheel(true)
end
end
end
Utils.WeaponWheel(false)
end)```

What 10min per car?

