Garry's Mod Wiki


void GM:ScaleNPCDamage( NPC npc, number hitgroup, CTakeDamageInfo dmginfo )


Called when an NPC takes damage.

This hook is called only when a specific hit group of the NPC is hit. In cases where the hitgroup doesn't matter, you should use GM:EntityTakeDamage instead!


1 NPC npc
The NPC that takes damage
2 number hitgroup
The hitgroup (hitbox) enum where the NPC took damage. See Enums/HITGROUP
3 CTakeDamageInfo dmginfo
Damage info


Double the damage whenever an NPC is hurt.

hook.Add( "ScaleNPCDamage", "ScaleNPCDamageExample", function( npc, hitgroup, dmginfo ) dmginfo:ScaleDamage( 2 ) end )

Page Links

Special Pages



Render Time: 31ms

Session 0
DB GetPage 3
Generate Html 5
SaveChanges 9
Render Body 0
Render Sidebar 11