AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Stop client-side sound (https://forums.alliedmods.net/showthread.php?t=56904)

hlstriker 06-23-2007 20:10

Stop client-side sound
 
Is it possible to stop a client-side sound? I searched the forums and it looked like there wasn't a way to capture the client-side sounds. I can always capture the event that causes the sound, then force a stop if that's possible. If it's not possible it stop the sound, then is it possible to play a blank sound file to override the other sound?

Alka 06-23-2007 20:47

Re: Stop client-side sound
 
Hum...the only thing i think now is to make a task and execute "client_cmd("stopsound")" :/

hlstriker 06-23-2007 20:49

Re: Stop client-side sound
 
I thought of that, but I didn't want all the other sounds to stop too : /

Alka 06-23-2007 20:51

Re: Stop client-side sound
 
Hum...yeah;that cmd is blocking all sounds from client! But what sounds you want to block? "weapons sounds?" :D

hlstriker 06-23-2007 21:05

Re: Stop client-side sound
 
Yep, weapon sounds :P

Drak 06-23-2007 23:12

Re: Stop client-side sound
 
Code:
register_forward(FM_EmitSound, "emitSound") // Get rid of the crowbar hitting noise public emitSound(entity, channel, const sample[]) {     if(equali(sample,"weapons/cbar_hit1.wav")) {         return FMRES_SUPERCEDE     }     return FMRES_IGNORED }

Alka 06-24-2007 04:29

Re: Stop client-side sound
 
SixTwin is right,but you must do this way for all weapons! :|...take a look at this http://forums.alliedmods.net/showthread.php?t=41265 ;)


All times are GMT -4. The time now is 21:31.

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