OX_Inventory Integration

Find information on configuring for OX_Inventory

The following code needs to be added into ox_inventory/data/weapons.lua within your OX_Inventory resource:

['WEAPON_THROWLINE'] = {
	label = 'Throwbag',
	weight = 1000,
	throwable = true,
},

Next, you should navigate to ox_inventory/modules/weapons/client.lua and find the function named Weapon.Equip. Once you have found the function, add the following block of code to it:

if data.hash == `WEAPON_THROWLINE` then
	TriggerServerEvent("Server:ToggleThrowbag")
end

Additionally, you'll need to open the config.lua file within the Throw Bag resource and navigate to lines 1-3.

main = {
    itemEnabled = false,
    itemName = "throwbag",

Here you can enable the item and also choose the name. You should also enable oxInv further down the config on line 19.

Last updated