Garry's Mod Wiki

CTakeDamageInfo:GetAttacker

  Entity CTakeDamageInfo:GetAttacker()

Description

Returns the attacker ( character who originated the attack ), for example a player or an NPC that shot the weapon.

Returns

1 Entity
The attacker