Garry's Mod Wiki

Revision Difference

Entity:TakeDamage#514579

<function name="TakeDamage" parent="Entity" type="classfunc">⤶ <description>⤶ Applies the specified amount of damage to the entity with [DMG_GENERIC](/gmod/Enums/DMG) flag.⤶ ⤶ <warning>Calling this function on the victim entity in <page>ENTITY:OnTakeDamage</page> can cause infinite loops.</warning>⤶ </description>⤶ <realm>Server</realm>⤶ <args>⤶ <arg name="damageAmount" type="number">The amount of damage to be applied.</arg>⤶ <arg name="attacker" type="Entity">The entity that initiated the attack that caused the damage.</arg>⤶ <arg name="inflictor" type="Entity">The entity that applied the damage, eg. a weapon.</arg>⤶ </args>⤶ </function>⤶ ⤶