Raised This Month: $ Target: $400
 0% 

block rocket sound explosion(HL1)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
neverminde
Senior Member
Join Date: Feb 2011
Location: St.Piter
Old 10-04-2014 , 00:08   block rocket sound explosion(HL1)
Reply With Quote #1

Hi, i want to block sound of rocket explosion (half-life rocketluancher)
PHP Code:
"weapons/explode3.wav",
"weapons/explode4.wav",
"weapons/explode5.wav" 
I tried this forward
PHP Code:
register_forward(FM_EmitSound"block_sound"
Works with sound like
PHP Code:
"common/wpn_denyselect.wav",

"player/death1.wav",
"player/death2.wav",
"player/death3.wav",

"player/pain1.wav",
"player/pain2.wav",
"player/pain3.wav" 
but it dont work with explosion sound

Last edited by neverminde; 10-04-2014 at 00:08.
neverminde is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-04-2014 , 10:02   Re: block rocket sound explosion(HL1)
Reply With Quote #2

I think that your answer is here: https://forums.alliedmods.net/showthread.php?t=249283
__________________
HamletEagle is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 10-04-2014 , 11:31   Re: block rocket sound explosion(HL1)
Reply With Quote #3

in your case, you would need to hook SVC_TEMPENTITY event, since that sound is played when sending TE_EXPLOSION message (as a last param).
Code:
register_message(SVC_TEMPENTITY, "HookTempEnt");

public HookTempEnt()
{
        if( get_msg_arg_int(1) == TE_EXPLOSION)
        {
                  set_msg_arg_int(8, ARG_BYTE, 0);
         }
}
}
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:29.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode