CTakeDamageInfo.IsFallDamage

From GMod Wiki

Jump to: navigation, search
Function
Syntax CTakeDamageInfo:IsFallDamage( )
Description:
Returns whether the DamageInfo is a case of fall damage.
Returns: Boolean
In Object: CTakeDamageInfo
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=CTakeDamageInfo.IsFallDamage]CTakeDamageInfo.IsFallDamage [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionThis messages to the console when fall damage is taken.
Used onNewerServer.png
Code
function GM:ScalePlayerDamage( ply, hitgroup, dmginfo )
   if dmginfo:IsFallDamage() then
      MsgN( "Player "..ply:Name().." took "..dmginfo:GetDamage().." fall damage." )
   end
end
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox