Add a custom weapon on OX Inventory
Last updated
Last updated
Don't forget to add the weapon image to your inventory system.
The images are located in each our script file.
For all inventories, the addition of images is more or less identical.
For qb-inventory the directory is: /qb-inventory/html/images/
For ak47_qb_inventory the directory is: /ak47_qb_inventory/web/build/images/
For ox_inventory the directory is: /ox_inventory/web/images/
For esx_inventory the directory is: /esx_inventory/html/img/items/
When you've finished creating your item, don't forget to set UseFramework to true in the config.lua file of the script in question!
List of weapon names in our scripts:
WEAPON_MEGAPHONE
WEAPON_PEPPERSPRAY
WEAPON_ANTIDOTE
WEAPON_BOLAWRAP
WEAPON_SPREADER
WEAPON_CUTTER
WEAPON_GLASSMASTER
If the weapon gets a bug similar to the gif below (the weapon vibrates) follow the tutorial
Go to the ox_inventory/modules/weapon/client.lua directory
Go to line 77 and replace the two selected lines as shown in the photo below with our code
Replace:
by this: