Garry's Mod Wiki

CTakeDamageInfo:GetWeapon

Description

Returns the inflicting weapon of the damage event, if there is any.

This is not necessarily a Weapon entity, but it is very likely to be one.

See CTakeDamageInfo:GetInflictor for the actual entity that did the damage.

Returns

1 Entity
The damage-inflicting weapon or NULL.