Gamemode.OnDamagedByExplosion

From GMod Wiki

Revision as of 15:15, 17 February 2011 by BlackVoid (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Event Hook
Hook NameOnDamagedByExplosion
SyntaxGM:OnDamagedByExplosion( Player Player, Damage dmginfo )
DescriptionPlayer has been hurt by an explosion.
ReturnsNil
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.OnDamagedByExplosion]Gamemode.OnDamagedByExplosion [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Example

DescriptionMake players hear the ear-ringing effect upon getting blast damage. (defined in the base gamemode)
Used onNewerServer.png
Code
function GM:OnDamagedByExplosion( ply, dmginfo )
 
        ply:SetDSP( 35, false )
 
end
OutputEar-ringing effect can be heard.


Additional Notes


Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox