Garry's Mod Wiki

CTakeDamageInfo:SetAmmoType

  CTakeDamageInfo:SetAmmoType( number ammoType )

Description

Changes the ammo type used by the weapon that inflicted the damage.

Arguments

1 number ammoType
Ammo type ID

Example

Creates a new DamageInfo object and sets the ammo that caused the damage to AR2 ammo

local dmginfo = DamageInfo() dmginfo:SetAmmoType( game.GetAmmoID( 'AR2' ) )