CTakeDamageInfo.GetDamage

From GMod Wiki

Jump to: navigation, search
Function
Syntax CTakeDamageInfo:GetDamage( )
Description:
Gets the damage from a CTakeDamageInfo.
Returns: Integer damage
In Object: CTakeDamageInfo
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=CTakeDamageInfo.GetDamage]CTakeDamageInfo.GetDamage [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionThis messages to the console the damage players take.
Used onNewerServer.png
Code
 
function GM:ScalePlayerDamage(ply,hitgroup,dmginfo)
   Msg ("Player "..ply:Name().." took "..dmginfo:GetDamage().." damage!\n")
end
 
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox