Garry's Mod Wiki

Revision Difference

CTakeDamageInfo:GetInflictor#514122

<function name="GetInflictor" parent="CTakeDamageInfo" type="classfunc">⤶ <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](/gmod/CTakeDamageInfo/GetAttacker) with [GetActiveWeapon](/gmod/Player/GetActiveWeapon).⤶ </description>⤶ <realm>Shared</realm>⤶ <rets>⤶ <ret name="" type="Entity">The inflictor</ret>⤶ </rets>⤶ </function>⤶ ⤶