How to Add Addon Weapons to FiveM (ox_inventory)
How to add addon weapons to FiveM: stream folder, data_file lines for weapons.meta, ox_inventory weapons.lua, images, attachments, QBCore and ESX steps.

- Applies to
- FiveM Legacy (data_file loading as in the FiveM source of 2026-11-17), with notes for FiveM for GTAV Enhanced; ox_inventory v2.48.1 (2026-10-24) on Qbox (qbx_core v1.24.1, 2026-10-30) and ESX Legacy 1.16.4 (2026-10-18); QBCore with qb-inventory and qb-weapons (qb-weapons as of 2026-08-24); vMenu Enhanced v1.0.22 (2026-11-17) on servers without a framework
- Last verified
On this page
- Direct Answer
- How addon weapons work in FiveM
- Weapon data files: weapons.meta, WEAPONINFO_FILE and the rest
- How to add addon weapons to a FiveM server, step by step
- Register the weapon in ox_inventory/data/weapons.lua
- Where each server registers weapons: Qbox, ESX, QBCore and vMenu
- Addon weapon icons: inventory pictures and the weapon wheel
- Addon weapons on FiveM for GTAV Enhanced
- Troubleshooting
- Next Steps
Direct Answer
To add addon weapons to FiveM, install each weapon as a resource. Put the .ydr models and .ytd textures in stream. In fxmanifest.lua, list the .meta files under files and load each with data_file: WEAPONINFO_FILE for weapons.meta, WEAPONCOMPONENTSINFO_FILE for weaponcomponents.meta, WEAPON_METADATA_FILE for weaponarchetypes.meta, plus WEAPON_ANIMATIONS_FILE and PED_PERSONALITY_FILE, in the order the pack’s own manifest uses. Add ensure to server.cfg. With ox_inventory (Qbox, ESX), register the weapon name from the CWeaponInfo entry of weapons.meta in ox_inventory/data/weapons.lua with a label, weight and ammo type, add a PNG, restart and give it with /giveitem. ESX’s own inventory uses Config.Weapons; QBCore uses qb-core/shared/items.lua and shared/weapons.lua. On a vMenu server, list the weapon in config/weapons.json instead.
How addon weapons work in FiveM
An addon weapon is a resource with two halves. The streamed half is the art in the stream folder: the CodeWalker README describes a .ydr file as a drawable that “Contains a single asset’s 3d model” and a .ytd file as a texture dictionary. The data half is a set of .meta files. FiveM loads each one through a data file, which the Cfx docs define as “an entry in the resource manifest that references a file to load in the game extra content mounting system.”
Every weapon has one internal name, and every later step uses it. Open weapons.meta and find the CWeaponInfo entry: its Name line holds the weapon name, such as WEAPON_SNSPISTOL in the weaponsnspistol.meta that qb-weapons ships. ox_inventory hashes its key as the game weapon unless a model is set, so that name becomes the ox_inventory key and the item you give with /giveitem.
Streaming the weapon is not enough on a server that runs ox_inventory. With inventory:weaponmismatch on, its default, ox_inventory will “Disarm the player if an unexpected weapon is in use (i.e. did not use the weapon item)”. A weapon that is streamed but not registered is taken away again.
Addon weapon, replacement or stat patch
Three kinds of download look alike:
- Addon weapon. A new weapon with its own name and models, next to the base-game weapons. This guide covers that case.
- Replacement. A model made to take the place of a base-game weapon. The melee how-to tells you to rename a model “named after a weapon in-game”, and says guns made as replacements need “a bit more effort” to work as addons.
- Stat patch. An edited copy of an existing weapon’s meta, loaded with
WEAPONINFO_FILE_PATCH. QBCore’sqb-weaponsresource ships one,weaponsnspistol.meta. A community how-to for DLC guns says to keep the game’s file name, because “if you change it the game will attempt to load both metas when you spawn in the gun, which will cause a crash.”
Weapon data files: weapons.meta, WEAPONINFO_FILE and the rest
The types, mounters and examples come from the official Data Files page:
| File | data_file type | Mounter | Example on the Data Files page |
|---|---|---|---|
weapons.meta | WEAPONINFO_FILE | CWeaponInfoDataFileMounter | weaponpipebomb.meta from dlc_mpbikercrc |
weaponcomponents.meta | WEAPONCOMPONENTSINFO_FILE | CWeaponComponentDataFileMounter | weaponcomponents.meta from dlc_mpbikercrc |
weaponarchetypes.meta | WEAPON_METADATA_FILE | CWeaponMetaDataFileMounter | weaponarchetypes.meta from dlcmphalloweencrc |
weaponanimations.meta | WEAPON_ANIMATIONS_FILE | CWeaponAnimationsDataFileMounter | weaponanimations.meta from dlc_mpbikercrc |
pedpersonality.meta | PED_PERSONALITY_FILE | CPedModelMetaDataFileMounter | pedpersonality.meta from dlcgunrunning |
weapons.meta holds the weapon itself. In qb-weapons’ weaponsnspistol.meta, the CWeaponInfo entry sets Name, Model, Audio and the ammo type through AmmoInfo.
Four rules for these lines:
- WEAPONINFO_FILE or WEAPONINFO_FILE_PATCH. The Data Files page lists both with the same mounter,
CWeaponInfoDataFileMounter, gives no example for the patch type and does not explain the difference. FiveM’s client also unloads both types together, a step its source calls “early-unloading for CWeaponMgr”.qb-weaponsand the DLC how-to use the patch type for edited copies of existing weapons. Keep the type the pack’s own manifest uses. - Spell the type exactly. For an unknown type the client logs
Could not add data_file <file> - invalid type <type>.and skips the file. - FiveM keeps your order. The Data Files page gives no order for the weapon types. FiveM’s loader moves only
VEHICLE_LAYOUTS_FILEandHANDLING_FILEto the front, with a stable sort so that other entries “retain equivalent order”. Keep the order of the pack’s own manifest. - Leave out pickups.meta. The melee how-to’s author says FiveM “has some troubles using custom pickups.meta and may cause players to crash during or post game”, and uses the pickup of an existing weapon instead.
How to add addon weapons to a FiveM server, step by step
These steps apply to FiveM Legacy. The Enhanced differences follow in their own section.
- Check the download. The Cfx docs say each resource folder needs an
fxmanifest.lua“to be correctly parsed as a resource”. A weapon pack also carries its.ydrand.ytdfiles forstreamand its.metafiles, each listed in the manifest. The melee how-to says the models “must include .YDR, .YDT, and +hi.YTD files as shown, or the weapon will not show properly.” - Create a
[weapons]category. The Cfx docs say folders “between [brackets] which are categories” can hold several resources, and you are “free to name the folder and the resources as you wish”. One folder per weapon keeps each pack apart:
resources/
└── [weapons]/
└── my_weapon/
├── stream/
│ ├── *.ydr
│ └── *.ytd
├── meta/
│ └── *.meta
└── fxmanifest.lua
- Check or write
fxmanifest.lua. Most packs ship one. If yours does not, this manifest uses the five data file types from the table above, thefilesanddata_filelines of the manifest reference, and paths for themetafolder above. Keep only the lines for files your pack has.
fx_version 'cerulean'
game 'gta5'
files {
'meta/weaponcomponents.meta',
'meta/pedpersonality.meta',
'meta/weaponarchetypes.meta',
'meta/weaponanimations.meta',
'meta/weapons.meta',
}
data_file 'WEAPONCOMPONENTSINFO_FILE' 'meta/weaponcomponents.meta'
data_file 'PED_PERSONALITY_FILE' 'meta/pedpersonality.meta'
data_file 'WEAPON_METADATA_FILE' 'meta/weaponarchetypes.meta'
data_file 'WEAPON_ANIMATIONS_FILE' 'meta/weaponanimations.meta'
data_file 'WEAPONINFO_FILE' 'meta/weapons.meta'
fx_version 'cerulean' is the current manifest version and game 'gta5' means FiveM. A files entry adds a file “to the resource packfile, to be downloaded by clients upon loading the resource”. If the pack ships a client script that sets the weapon’s name, keep the line from its own manifest that loads it, or add a client_script entry, which the reference says “Defines a script to be loaded on the client”. A forum author says a weapon’s name is set “in a LUA file, similar to settings names for your cars.” Every manifest line is explained in fxmanifest.lua explained.
- Start the category. Add
start [weapons]toserver.cfg, the line the Cfx docs give for a category, or anensureline with each resource’s name, then restart the server.ensure“Restarts the resource specified in the argument, if it was started. If it wasn’t, starts the resource specified in the argument.” - Read the size warnings. FXServer prints
Asset <resource>/<file> uses <size> MiB of physical memory.(orvirtual memory) for anything over 16 MiB, and over 48 MiB it adds “Oversized assets can and WILL lead to streaming issues (such as models not loading/rendering).” The fix is in the oversized assets guide. - Write down the names. Take the weapon name from the
CWeaponInfoentry inweapons.meta. The same entry’sAttachPointslist the weapon’s component names, such asCOMPONENT_SNSPISTOL_CLIP_01inweaponsnspistol.meta; an addon pack defines its own components inweaponcomponents.meta.
Register the weapon in ox_inventory/data/weapons.lua
ox_inventory keeps its weapons, attachments and ammo in one file, data/weapons.lua. A server deployed from the Qbox txAdmin recipe has the resource in resources/[ox]/ox_inventory. The file returns three tables, Weapons, Components and Ammo, and ox_inventory reads it when it starts, so restart the server after every edit.
Add the weapon entry
This is the stock WEAPON_BATTLERIFLE entry. An addon weapon gets an entry of the same shape, with its own name from weapons.meta as the key. Add the inner entry inside the existing Weapons = { table of the file, not a second table:
Weapons = {
['WEAPON_BATTLERIFLE'] = {
label = 'Battle Rifle',
weight = 3300,
durability = 0.03,
ammoname = 'ammo-rifle2',
},
}
The defaults and stock values below are from ox_inventory v2.48.1, released October 24, 2026.
| Field | What it does | Default in v2.48.1 |
|---|---|---|
| Key | The name from weapons.meta, in capitals | Required |
label | Name shown in the inventory | None |
weight | Weight in grams | 0 |
durability | Durability lost per round fired; a new weapon starts at 100 | 0.05 |
ammoname | Ammo item the weapon loads | None, as on melee weapons |
throwable | true lets the item stack, as on grenades | Not set; weapons do not stack |
model | Game name, when it differs from the key; ox_inventory hashes it | The key |
anim | Own draw and holster animation, as on WEAPON_SWITCHBLADE | By weapon group |
Write the key in capitals. Before a lookup, ox_inventory lowercases the requested name and then turns any name that starts with weapon_ into capitals. A key written as ['weapon_battlerifle'] is never found by a name lookup, while /giveitem with weapon_battlerifle finds WEAPON_BATTLERIFLE.
For durability, the stock file gives WEAPON_ASSAULTRIFLE 0.03, WEAPON_PISTOL 0.1 and WEAPON_SNIPERRIFLE 0.5. Every round fired takes that value off the weapon’s durability, and at 0 it stops firing.
Ammo: reuse a stock calibre or add one
ammoname must name an entry in the Ammo table. The stock WEAPON_BATTLERIFLE uses ammo-rifle2, and an addon rifle can reuse an existing calibre the same way. Seven of the stock calibres in v2.48.1 (the file lists more, such as ammo-22):
| Ammo key | Label | Weight (g) |
|---|---|---|
ammo-9 | 9mm | 7 |
ammo-45 | .45 ACP | 15 |
ammo-rifle | 5.56x45 | 4 |
ammo-rifle2 | 7.62x39 | 8 |
ammo-sniper | 7.62x51 | 9 |
ammo-heavysniper | .50 BMG | 51 |
ammo-shotgun | 12 Gauge | 38 |
A new calibre is one more entry of the same shape inside Ammo = {. This is the stock ammo-rifle2 entry:
Ammo = {
['ammo-rifle2'] = {
label = '7.62x39',
weight = 8,
},
}
Attachments: the Components table
Each attachment is an item in the Components table. This is the stock at_flashlight entry; a new attachment item copies its shape with its own key and your weapon’s component names:
['at_flashlight'] = {
label = 'Tactical Flashlight',
weight = 120,
type = 'flashlight',
client = {
component = {
`COMPONENT_AT_AR_FLSH`,
`COMPONENT_AT_AR_FLSH_REH`,
`COMPONENT_AT_PI_FLSH`,
`COMPONENT_AT_PI_FLSH_02`,
`COMPONENT_AT_PI_FLSH_03`,
},
usetime = 2500
}
},
- The key is the item name for
/giveitem. componentlists component names; for an addon weapon, use the names its pack defines inweaponcomponents.meta. The backticks are FiveM’s compile-time hashes, “similar to GET_HASH_KEY”.typeis the slot. The stock types areflashlight,muzzle,grip,barrel,magazine,sightandskin, and a weapon takes one component per type.- One item, many weapons. ox_inventory tries each listed hash and attaches the first the weapon accepts. The stock
at_flashlightlists five, so adding your weapon’s flashlight hash to that list also works.
Add the inventory image
The inventory screen loads <image path>/<item name>.png, and the default image path is nui://ox_inventory/web/images. Save the picture in ox_inventory/web/images, named like the key; the stock folder uses names such as WEAPON_ADVANCEDRIFLE.png. The resource sends web/images/*.png to players, so use PNG. New ammo and attachment items follow the same rule, the item name plus .png. A different file can be set with client.image, as the stock at_suppressor_light does with at_suppressor.png.
Restart, check and give the weapon
- Restart the server and look for
Inventory has loaded <count> itemsin the console. The count includes weapons, ammo and components, so it grows by the entries you added. - Give the weapon and ammo. Run
/giveitemwith the player, the item name and a count, once for the weapon and once for its ammo item. The first argument is the player’s server ID, andmemeans you. - Check your permissions. The command is restricted to
group.admin; the admin permissions guide shows how to get it. - Equip it from the inventory. A new weapon starts with 100 durability and 0 ammo. To load it, use the ammo item while holding the weapon, or press the reload key, R by default.
If ox_inventory knows the item but cannot give it, the server console prints a line that starts with Failed to give and ends with the reason. For an item name it does not know, the command prints nothing at all.
ox_inventory convars that affect addon weapons
ox_inventory is configured with convars, set with setr lines as in its docs:
| Convar | Default | Effect |
|---|---|---|
inventory:weaponmismatch | true | Disarms a player holding a weapon that did not come from the weapon item |
inventory:ignoreweapons | [] | Skips that check for the listed weapons, written as a JSON list such as ["WEAPON_SHOVEL"] |
inventory:weaponanims | true | Draw and holster animations |
inventory:aimedfiring | false | Weapons must be aimed before shooting |
The docs’ comment for inventory:ignoreweapons shows the list with single quotes, ['WEAPON_SHOVEL', 'WEAPON_HANDCUFFS']. The code reads the value with json.decode, and JSON needs double quotes, the form the same docs use for inventory:accounts ["money"].
Where each server registers weapons: Qbox, ESX, QBCore and vMenu
| Server | Weapon list | Give command |
|---|---|---|
| Qbox | ox_inventory/data/weapons.lua | /giveitem (ox_inventory) |
| ESX Legacy with ox_inventory | ox_inventory/data/weapons.lua | /giveitem (ox_inventory) |
| ESX Legacy, built-in inventory | Config.Weapons in es_extended/shared/config/weapons.lua | /giveweapon |
| QBCore with qb-inventory | qb-core/shared/items.lua and qb-core/shared/weapons.lua | /giveitem (qb-inventory) |
| vMenu, no framework | config/weapons.json, attachment names in config/weapon-components.json | Picked from the Weapon Options menu |
Qbox: custom weapons in ox_inventory
On Qbox, ox_inventory is the weapon list. qbx_core/shared/weapons.lua opens with a notice: “This file is deprecated. If you are utilizing QB-Core bridge functionality you will need to populate weapons here for them to be available in QBCore.Shared.Weapons. If not please add your weapons in ox_inventory/data/weapons.lua file.” Add an entry there only when an old QBCore script reads QBCore.Shared.Weapons.
When you convert QBCore items, the Qbox converter leaves out “Weapons that ox_inventory doesn’t know, such as weapon_briefcase”, for you to add by hand. QBCore’s pistol_ammo becomes ammo per calibre, such as ammo-9 and ammo-45. The full move is in migrating QBCore to Qbox.
ESX Legacy: ox_inventory or Config.Weapons
With ox_inventory, its ESX page says “Loadouts do not exist and weapons are treated as items.” Follow the ox_inventory steps above.
es_extended picks the mode itself: when the ox_inventory resource is present, shared/config/main.lua sets Config.CustomInventory = "ox", and es_extended’s own /giveweapon command is then not registered.
With ESX’s own inventory, es_extended needs the weapon in Config.Weapons. The esx_inventory resource bundled with esx_core 1.16.4 (October 18, 2026) does not change that: its README says “es_extended stays the authority on items, weight and validation”, and it shows weapons next to items. This is a stock entry from shared/config/weapons.lua:
{ name = "WEAPON_CERAMICPISTOL", label = TranslateCap("weapon_ceramicpistol"), tints = Config.DefaultWeaponTints, components = {}, ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` } },
name is the game name in capitals, ammo.hash the ammo type, and components holds entries with a name, a label and a component hash. label is any text; the stock entries take it from a locale key through TranslateCap. Three things fail without the entry:
xPlayer.addWeapon, which scripts use to give a weapon, looks up its label and stops with “Invalid weapon name!”./giveweapon <id> <weapon> <ammo>, open to theownerandadmingroups, checks its weapon argument through the same lookup.- When a player loads, es_extended drops every saved weapon it cannot find, so the gun is gone after a reconnect.
QBCore: add a custom weapon to qb-core
QBCore’s docs say it “has withdrawn from other platforms”, and ox_inventory does not support QBCore (see how to add items to ox_inventory). A QBCore server registers weapons for qb-inventory and qb-weapons in two files, plus a durability entry in qb-weapons. Write the names in lowercase, such as weapon_pistol, as the stock entries do: qb-inventory’s /giveitem lowercases the name before it looks the item up, so an item key in capitals is never found.
- Add the item in
qb-core/shared/items.luawithtype = 'weapon', anammotypeandunique = true. Add only the inner line, inside the existingQBCore.Shared.Items = {table. A stock entry:
QBCore.Shared.Items = {
weapon_assaultrifle = { name = 'weapon_assaultrifle', label = 'Assault Rifle', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', image = 'weapon_assaultrifle.png', unique = true, useable = false, description = 'A rapid-fire, magazine-fed automatic rifle designed for infantry use' },
}
- Add the weapon in
qb-core/shared/weapons.lua. The docs say this table “is only for looking up weapon information via it’s hash”, withname,label,weapontype,ammotypeanddamagereason. Entries are keyed by hash:
[`weapon_pistol`] = { name = 'weapon_pistol', label = 'Pistol', weapontype = 'Pistol', ammotype = 'AMMO_PISTOL', damagereason = 'Pistoled / Blasted / Plugged / Bust a cap in' },
- Save the picture in
qb-inventory/html/images, under the file name inimage. - Add the weapon to
Config.DurabilityMultiplierinqb-weapons/config.lua. The value is the quality each shot takes off the weapon (the stockweapon_assaultrifleuses 0.15). qb-weapons subtracts it with no fallback, so a firearm without an entry causes a script error in qb-weapons when it is fired. A weapon that should never wear goes inConfig.DurabilityBlockedWeaponsinstead. - Optional: attachments.
WeaponAttachmentsin the same file maps attachment items such asclip_attachmentto a component per weapon name; without an entry, players see “This attachment is not valid for the selected weapon.” - Give it with
/giveitem <id> <item> <amount>as an admin. qb-inventory gives a weapon one at a time, with quality 100 and a serial number, and answers “Item does not exist” for unknown names.
vMenu: addon weapons in config/weapons.json
A server that runs vMenu without a framework or an inventory resource gives weapons through vMenu’s Weapon Options menu. vMenu Enhanced lists that menu’s weapons in config/weapons.json, grouped into categories, and its docs say that “addon weapons go in weapons.json with their attachments in weapon-components.json”. This is the docs’ example:
{
"Handguns": {
"weapon_pistol": "WT_PIST",
"weapon_combatpistol": "WT_PIST_CBT"
},
"My Addon Weapons": {
"weapon_myaddonrifle": "Custom Rifle"
}
}
- Left side: the weapon’s spawn name, “lowercased for you”, so the name from the
CWeaponInfoentry ofweapons.metaworks as it is. Right side: the label shown in the menu. - Start order: a listed weapon the game does not know “is shown locked with a note, and unlocks on its own once the resource streaming it starts”.
- Permissions: each category gets a permission generated at server start, such as
vMenu.Enhanced.Menus.WeaponOptions.Categories.handgunsfor a category named Handguns. The ACE permissions guide explains how to grant one.
Addon weapon icons: inventory pictures and the weapon wheel
There are two icons. The inventory picture is the PNG described above for ox_inventory, or the file in qb-inventory/html/images on QBCore. The weapon wheel is separate. For the name, the Cfx docs describe AddTextEntry as a native “to add a custom text entry that can be displayed on the game UI”, called from a client script. In qb-weapons’ weaponsnspistol.meta, the HumanNameHash field holds WT_SNSPISTOL, a WT_ key of the kind vMenu’s docs call “A game text label”.
A community tutorial on the Cfx forum adds wheel icons by editing a copy of the game’s hud.gfx, taken from the game files with OpenIV, in the JPEXS Flash Decompiler. You add the image as a shape and sprite, give the weapon type’s SLOT_WEAPONS_ entry a frame label written as INT followed by the weapon hash, export the sprite under the weapon’s spawn code, and stream the edited hud.gfx from a resource’s stream folder. The slot depends on the weapon type:
| Slot | Weapons |
|---|---|
SLOT_WEAPONS_0 | Pistols |
SLOT_WEAPONS_1 | SMGs |
SLOT_WEAPONS_2 | Rifles |
SLOT_WEAPONS_3 | Snipers |
SLOT_WEAPONS_4 | Melee |
SLOT_WEAPONS_5 | Shotguns |
SLOT_WEAPONS_6 | Heavy weapons |
SLOT_WEAPONS_7 | Throwables |
On an ox_inventory server players equip weapons from inventory slots. The code describes its weapon wheel switch as one that “Enables the weapon wheel, but disables the use of inventory weapons”, so the PNG is the icon that matters there. The hud.gfx tutorial does not mention Enhanced.
Addon weapons on FiveM for GTAV Enhanced
- Folders. A resource can carry a
stream_enhancedfolder, whose contents load “instead of the stream folder” on Enhanced.streamstill works when nostream_enhancedfolder exists, but it is deprecated. Put Legacy files instreamand converted files instream_enhanced. - Conversion. Alchemist converts Legacy assets for Enhanced. It handles YDR, YTD, YFT, YPT and YDD, which covers weapon models and textures, and it requires Windows 11, so on a Linux server you convert the files on a Windows 11 PC and upload the result. Its GUI stops at an escrowed asset, while the CLI skips such files. The steps are in the Alchemist guide.
- Escrow. The Enhanced changes page lists Asset Escrow as “Not implemented yet”.
- Meta files. That page says nothing about
data_fileentries or weapon.metafiles as of November 21, 2026. The ox_inventory entry is plain Lua data, but ox_inventory’s docs do not mention Enhanced. Test an addon weapon on an Enhanced test server before you go live.
Troubleshooting
Addon weapon not showing or invisible in FiveM
- Cause: the names do not match, or the models are not streamed. The melee how-to puts the models in the
streamfolder and warns to “make sure all the names match”, “or it may not function correctly”. Fix: compare the names in the.metafiles with the file names instream. - Cause: model or texture files are missing. Fix: use a pack with the
.ydr,.ytdand+hi.ytdfiles the melee how-to lists.
“Unable to use …” when you equip the addon weapon
ox_inventory gives the player the weapon’s hash, then checks that the game actually selected it. When it did not, the player sees “Unable to use” with the weapon’s label, and the client console prints failed to equip <name> (cause unknown). The game does not know that hash. Check that the weapon resource started without errors, and that the key in data/weapons.lua, or its model, is exactly the name in weapons.meta.
Attachments are missing or invisible
Check that the attachment models are streamed too; the forum Pistol replacement streams its magazines as w_pi_pistol_mag1 and w_pi_pistol_mag2. Then check the weapon’s AttachPoints in weapons.meta: each component there has a Default value, true for the one the gun carries by default, as COMPONENT_SNSPISTOL_CLIP_01 in qb-weapons’ weaponsnspistol.meta.
The weapon disappears as soon as you equip it
This is ox_inventory’s weapon mismatch check. The weapon did not come from an inventory item, or the item is missing from data/weapons.lua. Register it, restart, and give it with /giveitem. When the game or another resource swaps an equipped weapon away, ox_inventory writes <name> was forcibly unequipped (caused by game behaviour or another resource) to the client console. For a tool that a script hands out on purpose, list it in inventory:ignoreweapons.
/giveitem does nothing for the weapon
ox_inventory prints nothing when it does not know the item name, so check these in order:
- The key is missing from the
Weaponstable, or it is not in capitals. - The server was not restarted after the edit; check the
Inventory has loadedcount. - You are not in
group.admin.
“This weapon is incompatible with …” when adding an attachment
None of the hashes in the component item fits the weapon. Add the component name from your weaponcomponents.meta to the item’s component list. If the game still refuses it, check that the weapon’s AttachPoints in weapons.meta list the component.
“This weapon’s … slot is already occupied”
The weapon already carries a component of the same type. Remove the attached one first, or give the new item another type.
An addon weapon pushes another weapon out
Weapons that share slot order numbers in weapons.meta clash. The melee how-to warns that “if you do use the same slot order numbers, you may force a weapon out of your inventory”. Give each addon its own numbers.
The game crashes when the weapon loads
- A custom
pickups.metacan crash players, per the melee how-to; remove its line. - A patched DLC weapon meta under a new file name makes the game load both files; restore the original name.
“Could not add data_file … - invalid type …”
A data_file type is misspelled. Copy it from the table above; the client skips the file until it matches.
ESX: “Invalid weapon name!” or the weapon is gone after reconnecting
The weapon has no Config.Weapons entry, or its name there is not in capitals. Add one, restart, and give the weapon again with /giveweapon.
QBCore: “Your ammo type is wrong.”
qb-weapons compares the ammo item’s type, such as AMMO_RIFLE for rifle_ammo, with ammotype in qb-core/shared/weapons.lua. Give the weapon an entry there with the right ammotype. Without any entry, the same code reads QBCore.Shared.Weapons[weapon]['name'] from a missing entry and fails with a script error instead of a message.
QBCore: qb-weapons script error when the addon weapon fires
qb-weapons reads the weapon’s Config.DurabilityMultiplier value each time the weapon wears and subtracts it from the quality. Without an entry for your weapon name, that subtraction fails. Add the entry in qb-weapons/config.lua, or list the weapon in Config.DurabilityBlockedWeapons, and restart.
Next Steps
- Add the other items your server needs with how to add items to ox_inventory.
- Check which framework fits your server in QBCore vs Qbox vs ESX Legacy.
- Shrink a weapon texture that triggers the size warning with the oversized assets guide, or browse FiveCrate’s weapons category.
- Convert your weapon files for Enhanced with the Alchemist conversion guide.
Weapons & attachments: first releases coming soon
Join the FiveCrate Discord to hear when the first releases go live.
Official documentation and repository references
- Cfx.re Docs: Data Files
- Cfx.re Docs: Resource Manifest
- Cfx.re Docs: What's Changed in FiveM for GTAV Enhanced
- ox_inventory source: data/weapons.lua (v2.48.1)
- Overextended Docs: ox_inventory installation and config
- QBCore Docs: Shared (Items and Weapons)
- qb-weapons source: weaponsnspistol.meta
- Cfx.re Forum (community how-to): Stream Addon Melee Weapons
Related guides
Alchemist FiveM: Convert Assets for GTA V Enhanced
Alchemist FiveM guide: convert Legacy YDR, YTD, YFT, YPT and YDD files to Gen9, set up stream_enhanced, use the CLI and handle escrowed assets.
How to Add Items to ox_inventory (Qbox, ESX, QBCore)
How to add items to ox_inventory: define them in data/items.lua, add PNG images, make them usable, and what changes on Qbox, ESX and QBCore servers.
fxmanifest.lua Explained for FiveM Server Owners
What each fxmanifest.lua line does in a FiveM resource: fx_version, game, scripts, files, data_file, dependencies, __resource.lua, lua54 and manifest errors.
FiveM 'Oversized Assets' Warning Explained and Fixed
The FiveM oversized assets warning starts above 16 MiB of physical or virtual memory. See the real FXServer thresholds and how to shrink a YTD file.
QBCore vs ESX vs Qbox: Which FiveM Framework in 2026?
QBCore vs ESX vs Qbox in 2026, from official sources: what QBCore leaving FiveM means, how Qbox and ESX Legacy differ, and which framework fits your scripts.


