Controlling ammo and reloading
For events and PvP arenas, SetPedInfiniteAmmo(ped, true, weapon) gives unlimited reserve and SetPedInfiniteAmmoClip(ped, true) a never-empty clip. Set exact amounts with SetPedAmmo, AddAmmoToPed or SetAmmoInClip. SetWeaponsNoAutoreload(true) disables automatic reloading so players reload with R (or MakePedReload). With ox_inventory, ammo lives in item metadata — do not fight it with infinite-ammo natives outside dedicated modes.
Arenas want endless ammo, roleplay servers want every bullet to count, and hardcore servers want players to reload by hand. FiveM exposes natives for all three — as long as you remember that an inventory may already be managing ammo for you.

#Infinite ammo for arenas and events
local function setArenaAmmo(enabled)
local ped = PlayerPedId()
local weapon = GetSelectedPedWeapon(ped)
SetPedInfiniteAmmo(ped, enabled, weapon)
SetPedInfiniteAmmoClip(ped, false) -- keep reloading, just never run dry
endTurn it off when players leave the arena — see redzone and PvP setup.
#Setting ammo amounts
| Native | Does |
|---|---|
SetPedAmmo(ped, weapon, n) | Sets the total for that weapon |
AddAmmoToPed(ped, weapon, n) | Adds rounds |
SetAmmoInClip(ped, weapon, n) | Sets the current clip |
GetWeaponClipSize(weapon) | Clip size of the weapon |
Give ammo from the server through your inventory so it is saved — see giving weapons and ammo items.
#Manual reloading
SetWeaponsNoAutoreload(true) -- empty clip stays empty until the player reloads
SetWeaponsNoAutoswap(true) -- do not switch weapon when out of ammo
RegisterCommand('+reload', function()
MakePedReload(PlayerPedId())
end, false)
RegisterCommand('-reload', function() end, false)
RegisterKeyMapping('+reload', 'Reload weapon', 'keyboard', 'R')SetWeaponsNoAutoreload and SetWeaponsNoAutoswap are FiveM client natives. The default R key already reloads; the key mapping above only matters if you disabled the default control.
#Inventories and ammo
ox_inventory stores loaded ammo in the weapon’s metadata and sets it with SetPedAmmo when a weapon is equipped; reloading consumes ammo items. Infinite-ammo natives bypass that and can desync the saved count, so use them only in modes where inventory ammo does not matter.
Questions
How do I give infinite ammo in FiveM?
SetPedInfiniteAmmo(PlayerPedId(), true, weaponHash); add SetPedInfiniteAmmoClip(ped, true) for a clip that never empties.How do I disable automatic reloading?
SetWeaponsNoAutoreload(true) on the client.How do I stop the game switching weapons when out of ammo?
SetWeaponsNoAutoswap(true).Does infinite ammo work with ox_inventory?
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.
Look it up while you work
The reference tables this guide leans on, free and without an account.
- All 860 ped model namesEvery model GetHashKey resolves, with its hash and how many clothing components and props it carries.