CTakeDamageInfo/GetInflictor

From Garry's Mod
Jump to: navigation, search
 CTakeDamageInfo:GetInflictor( )

Description

Returns the inflictor of the damage. This is not necessarily a weapon.

For hitscan weapons this is the weapon.
For projectile weapons this is the projectile.

For a more reliable method of getting the weapon that damaged an entity, use GetAttacker with GetActiveWeapon.

Returns

Entity

The inflictor
Personal tools
Navigation