CTakeDamageInfo.IsBulletDamage

From GMod Wiki

Revision as of 18:42, 26 February 2011 by nüke (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax CTakeDamageInfo:IsBulletDamage( )
Description:
Returns whether the DamageInfo is a case of bullet damage.
Returns: Boolean
In Object: CTakeDamageInfo
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=CTakeDamageInfo.IsBulletDamage]CTakeDamageInfo.IsBulletDamage [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

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


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox