Garry's Mod Wiki

Revision Difference

GM:OnNPCKilled#511164

<function name="OnNPCKilled" parent="GM" type="hook">⤶ <ishook>yes</ishook>⤶ <description>Called whenever an NPC is killed.</description>⤶ <realm>Server</realm>⤶ <predicted>No</predicted>⤶ <hidepredictionwarning>No</hidepredictionwarning>⤶ <args>⤶ <arg name="npc" type="NPC">The killed NPC</arg>⤶ <arg name="attacker" type="Entity">The NPCs attacker, the entity that gets the kill credit, for example a player or an NPC.</arg>⤶ <arg name="inflictor" type="Entity">Death inflictor. The entity that did the killing. Not necessarily a weapon.</arg>⤶ </args>⤶ </function>⤶ ⤶