FOR OX_INVENTORY SERVERS
Custom weapons for ox_inventory, with the weapons.lua entries written
Streaming the model is the smaller part of adding a weapon to ox_inventory. The inventory also wants a Lua entry with a weight and an ammo item, and a PNG whose file name matches the item. The export writes the first and passes on the second whenever the pack has one.
What ox_inventory needs before a weapon shows up
A weapon can stream and fire correctly and still be missing from the inventory. ox_inventory takes its weapon list from data/weapons.lua and loads each icon from web/images, matching the file name to the item name. Without the entry the item does not exist; without the image, or with a misnamed one, the slot shows an empty square.
- An entry in the
Weaponstable ofdata/weapons.luawith a label, weight, durability and ammo item - A PNG in
web/imagesnamed after the item - The weapon resource itself, started from
server.cfg - An ammo item that exists on your server
Every export carries items/ox_inventory_weapons.lua with an entry for each weapon name its metadata declares. The label is the weapon's display name, the weight follows its weapon group and the ammo item follows the ammo type in its metadata, so a pistol gets ammo-9 and a rifle gets ammo-rifle without you looking either up.
What is in the download
- One resource folder per weapon, with a generated
fxmanifest.luathat declares the metadata files - The model files, copied byte for byte
- The texture dictionaries: untouched if you changed nothing, rebuilt in their original compression where you added artwork
items/ox_inventory_weapons.luaanditems/qb_weapons.lua, ready to paste- The inventory PNG under
items/ox_inventory/, when the pack the model comes from includes one README.mdandINSTALLATION.mdwith the ox_inventory, QBCore and ESX steps
data/weapons.lua
['WEAPON_YOURITEM'] = {
label = 'Your Weapon',
weight = 1200,
durability = 0.03,
ammoname = 'ammo-9',
},Not every model in the library has an inventory image. When one is missing the export says so in its warnings and you supply a PNG of your own; the item image guide covers size and naming.
Where your artwork goes
In the skin studio your image becomes a layer on one of the weapon's own texture sheets. A decal is placed by clicking the spot you want on the 3D model, and can then be moved, rotated or flipped; a pattern tiles across the sheet. The sheet is composited in your browser and drawn straight back onto the model, so the weapon you turn on screen is the one you export.
On export the edited sheet is written back into its texture dictionary in the compression format it already used. Models, metadata and animation clips are copied unchanged, and the source pack is never modified.
$5 for the first weapon in an order and $4 for every one after it, paid once, so a set of 9 comes to $37 instead of $45. The first weapon on a new account is free. Buying a weapon puts the model in your library, and the studio exports it as often as you like.
Questions
Do I have to make the inventory image myself?
Will this work with Qbox?
Which ammo item do the generated entries use?
Can I take a weapon without changing anything?
Guides worth reading next
12 models to start with
Taken from the epic collection, out of 538 models in the library. Each one opens on its own page with the measured specification and the texture manifest.
Other server types
FREE TOOLS
Free tools that go with this
The names, hashes and weapons.meta values behind every model in the library, free to copy into your own scripts.











