๐ox_inventory
Step 1: Add this helper at the top of ox_inventory/client.lua
ox_inventory/client.lua
function DoNotSkip()
local inPaintball = GetResourceState("pug-paintball") == "started"
and exports["pug-paintball"]:IsInPaintball()
local inBattleRoyale = GetResourceState("pug-battleroyale") == "started"
and exports["pug-battleroyale"]:IsInBattleRoyale()
return not inPaintball and not inBattleRoyale
end
Step 2: Edit this code. To quickly find the code to edit, open the client and then hit CTRL+F
and then search up
CTRL+F
and then search up if weaponType ~= 0 and weaponType ~= `GROUP_UNARMED` then
Replace the following code in ox_inventory/client.lua at around line 1394
: with this
if weaponType ~= 0 and weaponType ~= `GROUP_UNARMED` and DoNotSkip() then
Weapon.Disarm(currentWeapon, true)
end
Step 3: Edit this code. To quickly find the code to edit, open the client and then hit CTRL+F
and then search up
CTRL+F
and then search upif usingItem or invBusy == true or IsPedCuffed(playerPed) then
OR
if usingItem or invOpen or IsPedCuffed(playerPed) then
Replace the following code in ox_inventory/client.lua at around line 1437
: with this
if usingItem or invBusy or invOpen or IsPedCuffed(playerPed) then
if DoNotSkip() then
DisablePlayerFiring(playerId, true)
end
end
Last updated