CTakeDamageInfo.GetBaseDamage

From GMod Wiki

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



Example

DescriptionThis messages to the console the base damage players take.
Used onNewerServer.png
Code
function GM:ScalePlayerDamage(ply,hitgroup,dmginfo)
   MsgN ("Base damage done to " .. ply:Name() .. ":" .. dmginfo:GetBaseDamage() .. " damage!")
end
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox