GM:OnDamagedByExplosion

From Garry's Mod
Jump to: navigation, search
 GM:OnDamagedByExplosion( )

Contents

Description

Called when a player has been hurt by an explosion. Override to disable default sound effect.

Arguments

Player ply

Player who has been hurt

Arguments

CTakeDamageInfo dmginfo

Damage info from explsion

Examples

Example

Disables the high pitched ringing sound effect.

Note that this hook does not have a return value, and instead by default it calls Player:SetDSP( 35, false ) in the base gamemode.

hook.Add( "OnDamagedByExplosion", "DisableSound", function()
	return true
end )


Personal tools
Navigation