CTakeDamageInfo.SubtractDamage

From GMod Wiki

Revision as of 12:46, 31 December 2010 by Cube334 (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax CTakeDamageInfo:SubtractDamage( Integer subtraction )
Description:
Subtracts from the damage in a DamageInfo.
Returns: nil
In Object: CTakeDamageInfo
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=CTakeDamageInfo.SubtractDamage]CTakeDamageInfo.SubtractDamage [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionThis makes players take 1 less damage from any attack on them.
Used onNewerServer.png
Code
function GM:ScalePlayerDamage(ply,hitgroup,dmginfo)
   dmginfo:SubtractDamage(1)
end
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox