Inventorybeginner12 min readupdated 11 Sept 2026

Ammo in FiveM: game ammo pools and inventory ammo items

The short answer

In GTA V each weapon references an ammo type (AMMO_PISTOL, AMMO_RIFLE…), and weapons sharing a type share one pool. ox_inventory turns calibres into items — ammo-9 for 9 mm pistols and SMGs, ammo-rifle (5.56×45), ammo-rifle2 (7.62×39), ammo-shotgun (12 gauge) and so on — and each weapon’s ammoname says which item reloads it. QBCore uses items such as pistol_ammo; ESX’s default loadout stores ammo per weapon.

Ammo trips up more new server owners than weapons do. GTA V itself groups weapons into shared ammo pools, and every inventory then layers its own ammo items on top, with its own names and rules. Once you see both layers, questions like “why does my rifle use the pistol’s ammo?” or “why can my addon gun not be reloaded?” answer themselves.

Ammo in FiveM: game ammo pools and inventory ammo items — illustrated with a FiveM-compatible minimap render

#Layer one: GTA V ammo pools

In weapons.meta, each weapon points at an ammo info with <AmmoInfo ref="AMMO_PISTOL" />. Weapons that point at the same ammo info share one pool of rounds in the base game — if you give 100 pistol rounds, the combat pistol has them too. Frameworks without an item-based inventory inherit this behaviour.

client.lua — working with the game’s pools
local ped = PlayerPedId()
SetPedAmmo(ped, `WEAPON_PISTOL`, 60)
print(GetAmmoInPedWeapon(ped, `WEAPON_PISTOL`))
print(GetPedAmmoTypeFromWeapon(ped, `WEAPON_PISTOL`)) -- the ammo type hash
AddAmmoToPed(ped, `WEAPON_PISTOL`, 12)

#Layer two: ox_inventory ammo items

ox_inventory makes ammunition physical: boxes of rounds are items with weight, and each weapon lists the item that reloads it. The weapon item carries its loaded rounds in metadata.ammo. These are the ammo items in ox_inventory’s default data, with the vanilla weapons that use each:

ItemLabelUsed by (vanilla)
ammo-99mmPistol, Pistol Mk II, Combat Pistol, AP Pistol, Vintage Pistol, Ceramic Pistol, WM 29, Perico Pistol, SMG, SMG Mk II, Combat PDW, Machine Pistol, Mini SMG, Tactical SMG (14)
ammo-45.45 ACPSNS Pistol, SNS Pistol Mk II, Heavy Pistol, Micro SMG, Gusenberg (5)
ammo-50.50 AEPistol .50
ammo-44.44 MagnumRevolver, Revolver Mk II, Navy Revolver
ammo-38.38 LCDouble Action Revolver
ammo-22.22 Long RifleMarksman Pistol
ammo-rifle5.56x45Carbine, Carbine Mk II, Advanced, Special Carbine (both), Bullpup (both), Military, Heavy, Tactical Rifle, Assault SMG, Combat MG (12)
ammo-rifle27.62x39Assault Rifle (both), Compact Rifle, Battle Rifle, MG, Combat MG Mk II, Minigun (7)
ammo-shotgun12 GaugeEvery shotgun except the musket (9)
ammo-sniper7.62x51Sniper Rifle, Marksman Rifle (both), Precision Rifle
ammo-heavysniper.50 BMGHeavy Sniper, Heavy Sniper Mk II
ammo-musket.50 BallMusket
ammo-grenade40mm ExplosiveGrenade Launcher, Compact Launcher
ammo-rocketRocketRPG, Homing Launcher
ammo-flare / ammo-fireworkFlare / FireworkFlare Gun / Firework Launcher

From ox_inventory’s default data/weapons.lua. Your server may have edited these.

Give ammo like any item: exports.ox_inventory:AddItem(source, 'ammo-9', 48). The full weapon-by-weapon list, including each weapon’s ammo item, is in the weapon names and hashes list.

#QBCore and ESX

FrameworkHow ammo works
QBCore (qb-inventory)Ammo items such as pistol_ammo, rifle_ammo, smg_ammo, shotgun_ammo, mg_ammo, snp_ammo; each weapon in qb-core/shared/weapons.lua has an ammotype like AMMO_PISTOL that matches them.
ESX default loadoutAmmo is stored with each weapon in the loadout; give it with xPlayer.addWeaponAmmo('WEAPON_PISTOL', 24).
ESX or QBox with ox_inventoryThe ox_inventory items above.

Which system you have depends on the inventory, not the framework name. See ESX items and loadout and QBCore shared weapons.

#Ammo for addon weapons

An addon weapon has an AmmoInfo in its weapons.meta, but the inventory also needs to know which item reloads it. In ox_inventory, add the weapon to data/weapons.lua with an ammoname:

ox_inventory/data/weapons.lua
['WEAPON_MYRIFLE'] = {
    label = 'My Rifle',
    weight = 3200,
    durability = 0.03,
    ammoname = 'ammo-rifle',
},
  1. Pick the calibre that fits the real-world weapon, so players already own the ammo.
  2. Match the AmmoInfo in weapons.meta to a similar vanilla weapon for consistent handling.
  3. Restart ox_inventory (or the server) after editing data files.

A missing ammoname is the usual reason an addon gun equips but never reloads. ox_inventory weapons data covers every field.

#Troubleshooting

SymptomCause
Weapon will not reloadNo matching ammo item in the inventory, or no ammoname for the weapon
Ammo disappears on relogAmmo was set with a native instead of the inventory
Two guns share ammo unexpectedlyThey share an AmmoInfo in weapons.meta (game pools) or an ammo item
Throwables stack oddlyThey use their own count as ammo; ox treats them as throwable items
Share this guideXRedditFacebook

Questions

What ammo does the pistol use in ox_inventory?
ammo-9 (9mm). The same item reloads 14 vanilla weapons, including the SMG and Combat Pistol.
What is the difference between ammo-rifle and ammo-rifle2?
ammo-rifle is 5.56×45 (carbines, special carbines, bullpups and more); ammo-rifle2 is 7.62×39 (assault rifles, compact rifle, MG, minigun).
How do I give ammo with ox_inventory?
exports.ox_inventory:AddItem(source, 'ammo-9', 48) on the server.
Why can I not reload my addon weapon?
The inventory does not know its ammo. Add the weapon to data/weapons.lua with an ammoname such as ammo-rifle.
Why do two different guns share ammo?
In GTA V, weapons that reference the same AmmoInfo share a pool; inventories also let one ammo item reload several guns.

Ready to pick a map?

Twelve themes on three base map styles, $8 each, instant download.

Relevant to what you just read

The tool for this

Twenty theme pairs for ox_lib and ox_inventory From $15, built in the browser, exported as a drop-in resource.