Knowledge from the fieldRedM

Swap player weapon to explosive ammo: _SET_AMMO_TYPE_FOR_PED_WEAPON + SET_PED_AMMO_BY_TYPE

learning:21

Swap player weapon to explosive ammo: _SET_AMMO_TYPE_FOR_PED_WEAPON + SET_PED_AMMO_BY_TYPE

Context

You give the player a weapon via GIVE_WEAPON_TO_PED and want every shot to be an explosive/incendiary variant — not the stock ammo. Useful for joke/superhero scripts and for cinematic NPCs.

The recipe

Two natives in sequence after the give:

local ped = PlayerPedId()
local weaponHash = GetHashKey('weapon_revolver_lemat')
local ammoHash   = GetHashKey('AMMO_REVOLVER_EXPRESS_EXPLOSIVE')

-- Give the weapon first (bIgnoreUnlocks=true, bAllowMultipleCopies=true to bypass story locks/inventory)
Citizen.InvokeNative(0x5E3BDDBCB83F3D84,
    ped, weaponHash, 500, true, false, 0, true, 0.5, 1.0, 0, true, 0.0, false)

-- Switch the loaded ammo type for that weapon slot
-- _SET_AMMO_TYPE_FOR_PED_WEAPON (ped, weaponHash, ammoHash)
Citizen.InvokeNative(0xCC9C4393523833E2, ped, weaponHash, ammoHash)

-- Top up the ammo pool for that ammo type so it isn't empty
-- SET_PED_AMMO_BY_TYPE (ped, ammoType, count)
Citizen.InvokeNative(0x5FD1E1F011E76D7E, ped, ammoHash, 500)

Ammo-by-weapon-group cheat sheet

  • Revolver: AMMO_REVOLVER_EXPRESS_EXPLOSIVE (0x04A8EFBB), AMMO_REVOLVER_HIGH_VELOCITY, AMMO_REVOLVER_SPLIT_POINT
  • Pistol: AMMO_PISTOL_EXPRESS_EXPLOSIVE (0x46A648C2)
  • Repeater: AMMO_REPEATER_EXPRESS_EXPLOSIVE (0x9C8B6796)
  • Rifle: AMMO_RIFLE_EXPRESS_EXPLOSIVE (0x6D926443)
  • Shotgun: AMMO_SHOTGUN_BUCKSHOT_INCENDIARY (0xBFCB2621)
  • Bow: AMMO_ARROW_DYNAMITE (0xC1F57A79), AMMO_ARROW_FIRE (0x11B25B49)

The trap

Calling only _SET_AMMO_TYPE_FOR_PED_WEAPON without SET_PED_AMMO_BY_TYPE leaves the explosive-ammo pool at 0, so the gun fires nothing or falls back to stock. Both are required.

Verified

Working in a superhero/chaos script — every Lemat shot detonates as a mini explosive round.

Linked natives

  • GIVE_WEAPON_TO_PED (0x5E3BDDBCB83F3D84)
  • _SET_AMMO_TYPE_FOR_PED_WEAPON (0xCC9C4393523833E2)
  • SET_PED_AMMO_BY_TYPE (0x5FD1E1F011E76D7E)

Tags: weapons, ammo, explosive, incendiary, give-weapon
Category: natives
Source: ch-superman
Created: 2026-05-03T10:23:42.321Z

Back to documentation