Gamemode.ScaleNPCDamage

From GMod Wiki

Revision as of 06:56, 30 September 2011 by Excl (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Event Hook
Hook NameScaleNPCDamage
SyntaxGM:ScaleNPCDamage( Npc npc, Enum hitgroup, Ctakedamageinfo dmginfo )
DescriptionModifies the damage received by an NPC.
ReturnsCtakedamageinfo
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.ScaleNPCDamage]Gamemode.ScaleNPCDamage [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]

Examples

DescriptionMakes every NPC 5 times weaker.
Used onNewerServer.png
Code
function ScaleDamage( npc, hitgroup, dmginfo )
 
	dmginfo:ScaleDamage( 5 )
 
end
 
hook.Add("ScaleNPCDamage","ScaleDamage",ScaleDamage)
OutputN/A


See Also


Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox