Ammo spawn IDs/Names for FiveM?

Can someone PLEASE share a list or give a quick run of all AMMO spawn names? NOT THE WEAPONS!!! I’ve dug for so long in these forums only to see a bunch of old, taken down links or a bunch of people misunderstanding the question thinking the person’s talking about weapon IDs. I need the AMMO spawn names. I know pistol_ammo, smg_ammo and the simple ones, I need to know mostly heavy because heavy_ammo is not working. “Does not exist” pops up so I’m at a loss for ammo on things like the minigun, Widowmaker and so on. Please help, thank you!

1 Like

As far as I know, there is no special ammo for the minigun or widowmaker, just regular ammo used for reloading. Feel free to pick apart my script to find what you are looking for. It has all the different ammo I could find.

Link to my Weapons Script

1 Like

You could do this by yourself. I don’t have time at the moment but here is how:

  1. take a list of all weapons
  2. write a function, which loops every weapon
  3. run this native on every key in your weaponlist ( GetPedAmmoTypeFromWeapon)

I think it could be something like this:

-- clientside code
RegisterCommand('ammolist', function(source, args, raw)
   local weaponlist = TABLE_WITH_ALL_WEAPONNAMES_HERE
   local ammolist = {}
   local player = PlayerPedId()
   for i = 1, #weaponlist, 1 do
      local ammo = tostring(GetPedAmmoTypeFromWeapon(player, GetHashKey(i)))
      if not ammolist[ammo] then
         print(ammo)
         ammolist[ammo] = true
      end
   end
end, false)
1 Like

Seems like a giant wrap around when someone could just link me to a list of weapons, ammo and their hashes no? Or are people just selfish to help others make things easier lmao

3 Likes

Thank you this actually helps, I just wanted IDs and or Hashes to help spawn the damn ammo in and for some reason literally nobody has any lists up online lol

2 Likes

I found this issue too.

If you happen to use ox_inventory, then I found the information by going to ox_inventory/data/weapons.lua. The ammo type for each weapon is listed at the bottom around line 1033 (on my most recent version in any case)

ammo-9
ammo-22
ammo-38
ammo-44
ammo-45
ammo-50
ammo-rifle
ammo-rifle2
ammo-shotgun
ammo-emp
ammo-flare
ammo-sniper
ammo-heavysniper
ammo-musket

Ammo = {
		['ammo-22'] = {
			label = '.22 Long Rifle',
			weight = 3,
		},

		['ammo-38'] = {
			label = '.38 Long Colt',
			weight = 10,
		},

		['ammo-44'] = {
			label = '.44 Magnum',
			weight = 16,
		},

		['ammo-45'] = {
			label = '.45 ACP',
			weight = 9,
		},

		['ammo-50'] = {
			label = '.50 AE',
			weight = 19,
		},

		['ammo-9'] = {
			label = '9mm',
			weight = 8,
		},

		['ammo-flare'] = {
			label = 'Flare round',
			weight = 38,
		},

		['ammo-heavysniper'] = {
			label = '.50 BMG',
			weight = 45,
		},

		['ammo-musket'] = {
			label = 'Musket round',
			weight = 30,
		},

		['ammo-rifle'] = {
			label = '5.56',
			weight = 4,
		},

		['ammo-rifle2'] = {
			label = '7.62',
			weight = 8,
		},

		['ammo-shotgun'] = {
			label = '12 Gauge',
			weight = 38,
		},

		['ammo-sniper'] = {
			label = '7.62 NATO',
			weight = 11,
		},

		['ammo-emp'] = {
			label = 'EMP round',
			weight = 400,
		},
	}
}
12 Likes

yeah but i have ox inventory. how can i get grenade launcher ammo??

weapon_rocket

To all who ACTUALLY tried to help, bless :raised_hands: Figured I should come back and give the answer for anyone stumbling upon this still looking. We use QB however someone else posted for Ox_inventory as well if thats needed, thanks to them as well! The QB line I found all weapon ammo and other needed items is:

resources/qbcore/qb/qb-core/shared/items.lua

This has ALL items in it, ended up running across it while coding for our server along with the command for gun ammo reffilling. That being /setammo [Number] | The max ammunition of this is 250. So /setammo 250 just gives whatever gun in hand max ammo! For coding purposes however, the line for QB is there! Thank you to all who genuinely wanted to help again, at the time this was a huge pain.

1 Like

If youre looking to spawn the ammo in and dont NEED the name, you can just hold the gun in hand and do /setammo 250. If you need it for coding, I believe the guy just above your comment added the ox list, we use QB ourselves so apologies I cant help further!

1 Like

ammo-9
ammo-22
ammo-38
ammo-44
ammo-45
ammo-50
ammo-rifle
ammo-rifle2
ammo-shotgun
ammo-emp
ammo-flare
ammo-sniper
ammo-heavysniper
ammo-musket

3 Likes

do you know the spawn codes for weapon attachments cheers