Santa & Christmas Edition36 maps, limited runlimited runShop the drop
Chapter 02 of 10The Weapon Skins Handbook for FiveM

Weapons in your inventory: ox_inventory, QBCore and ESX

In short

The inventory decides most of how weapons behave on a server. ox_inventory, qb-inventory and the ESX default each keep weapon data in a different file, with different fields.

InventoryWeapons areDefined inExtras
ox_inventoryItems with metadatadata/weapons.luaSerials, durability, attachments, hooks, shops, crafting
qb-inventory (QBCore)Items of type weaponQBCore.Shared.Weapons + shared/items.luaLargest QBCore script catalogue
ESX defaultA separate loadoutConfig.Weapons, saved in users.loadoutComponents and tints per weapon
ox_inventory/data/weapons.lua — one weapon
Weapons = {
    ['WEAPON_MYPISTOL'] = {
        label = 'My Pistol',
        weight = 1100,          -- grams
        durability = 0.1,       -- wear per shot
        ammoname = 'ammo-9',    -- the ammo item that reloads it
    },
}
QBCore — shared/weapons.lua and shared/items.lua
[`weapon_mypistol`] = { name = 'weapon_mypistol', label = 'My Pistol', weapontype = 'Pistol', ammotype = 'AMMO_PISTOL', damagereason = 'Shot by a pistol' },

['weapon_mypistol'] = { name = 'weapon_mypistol', label = 'My Pistol', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_mypistol.png', unique = true, useable = false, description = 'A custom pistol' },

ox_inventory officially supports ox_core, ESX, Qbox and ND_Core. On a new server, Qbox or ESX with ox_inventory gives the most complete weapon feature set, while QBCore with qb-inventory has the largest catalogue of ready-made scripts. Each one has a reference page here: ox_inventory, qb-inventory, qbx_core and es_extended.

Players see a weapon’s icon and tooltip long before they fire it, so the item image and the metadata behind the tooltip belong to the same setup.

InventoryImages live inName
ox_inventoryox_inventory/web/images/WEAPON_PISTOL.png (item name)
qb-inventoryqb-inventory/html/images/The item’s image field
  • Save icons as transparent PNG or WebP, and give every weapon the same framing and the same angle.
  • The ox_inventory metadata keys include durability, serial, registered, ammo, components, label, description and image.
  • To show a metadata key of your own in the tooltip, register it with displayMetadata on the client.

The Weapon Skins Handbook for FiveM

This chapter is one of 10. The handbook also carries the native, control and data-file cheat sheets, a glossary and the official references behind every chapter.

Open the handbook