Raised This Month: $ Target: $400
 0% 

Blocking bullet hit sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 12-29-2014 , 01:27   Blocking bullet hit sound
Reply With Quote #1

Hi
When a player is hit by a gunshot, 2 sounds are emit, and one of them is "weapons/bullet_hit1.wav".
How do I block this sound from being play?
RateX is offline
silentscope
Junior Member
Join Date: Jul 2011
Old 12-31-2014 , 03:39   Re: Blocking bullet hit sound
Reply With Quote #2

remove the emit line?^^ anyway post the code so everyone can help you
silentscope is offline
bat
Veteran Member
Join Date: Jul 2012
Old 12-31-2014 , 08:25   Re: Blocking bullet hit sound
Reply With Quote #3

Code:
#include amxmodx
#include fakemeta

public plugin_init(){
    register_forward(FM_EmitSound, "fw_Emitsound")
}

public fw_Emitsound(const sound[])
{
	if(equali(sound,"sound/weapons/bullet_hit1.wav")) 
	{
		return FMRES_SUPERCEDE;
	}
	return FMRES_IGNORED;
}
__________________
bat is offline
Send a message via Skype™ to bat
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 12-31-2014 , 10:36   Re: Blocking bullet hit sound
Reply With Quote #4

@bat:That is the first thing I did, and since it failed I post it here for help. BTW, the sound path does not contain "sound"
RateX is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-31-2014 , 11:25   Re: Blocking bullet hit sound
Reply With Quote #5

I think that sound is client side so you can't block it with FM_EmitSound
__________________
HamletEagle is offline
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 01-02-2015 , 04:26   Re: Blocking bullet hit sound
Reply With Quote #6

Is there any way to block it from emitting via powerful module like orpheu/okapi/rage?
RateX is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 01-02-2015 , 04:33   Re: Blocking bullet hit sound
Reply With Quote #7

Quote:
Originally Posted by RateX View Post
Is there any way to block it from emitting via powerful module like orpheu/okapi/rage?
Nope, they are handled client side, even if you replace the string in memory with orpheu/okapi it won't work. I don't know rage, but since they are client side I guess that the answer is still no. For an example of replacing search for qim tut or look into my Entities Resources Replacement plug.
__________________

Last edited by HamletEagle; 01-02-2015 at 04:34.
HamletEagle is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 01-02-2015 , 05:43   Re: Blocking bullet hit sound
Reply With Quote #8

You will need to block shooting entirely, then write the code which will do exactly the same, but without sounds... I know it's stupid, but I don't know any other way around.
klippy is offline
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 01-02-2015 , 14:22   Re: Blocking bullet hit sound
Reply With Quote #9

^The only thing I'm avoiding, though I did it anyway. I use UpdateClientData and playback_event to preserve traceattack, and it works, with the cost of weapon sound and dynamic crosshair. So anyone have info about volume, pitch and attenuation of cs weapon sound?
RateX is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 01-02-2015 , 14:46   Re: Blocking bullet hit sound
Reply With Quote #10

I think I saw someone posting a table with those values, although I am not entirely sure.
klippy is offline
Reply



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 15:18.


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