Raised This Month: $ Target: $400
 0% 

Block Terrorist and CT win sound.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hebusletroll
Senior Member
Join Date: Apr 2006
Old 09-06-2007 , 11:35   Block Terrorist and CT win sound.
Reply With Quote #1

Hello

Is there any way to block the Counter-Terrorist and Terrorist win sound ?

Because this doesn't work (required include are done):

Code:
public plugin_init() 
{
	register_plugin("MyTest",
	                    "Hebusletroll",
		       "0.0")
	
	register_forward(FM_EmitSound,"emitsound")
}

public emitsound(entity, channel, const sample[])
{
	if(equali(sample,"radio/terwin.wav")||equali(sample,"radio/ctwin.wav")) {
		return FMRES_SUPERCEDE
	}
	return FMRES_IGNORED
}
^^

Why it doesn't work ? ;)
hebusletroll is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-06-2007 , 11:41   Re: Block Terrorist and CT win sound.
Reply With Quote #2

Here what i'm using :

Code:
    public plugin_init()     {           // block win sounds         register_message( get_user_msgid( "SendAudio" ),"message_sendaudio" );                 // block win messages         register_message( get_user_msgid( "TextMsg" )  ,"message_textmsg"   );     }             public message_textmsg( msg_id, msg_dest, msg_entity )     {         static message[3];         get_msg_arg_string( 2, message, sizeof message - 1 );         switch( message[1] )         {             // -- #CTs_Win ; #Terrorists_Win ; #Round_Draw             case 'C', 'T', 'R' : return PLUGIN_HANDLED;         }         return PLUGIN_CONTINUE;     }     public message_sendaudio( msg_id, msg_dest, msg_entity )     {         static message[10];         get_msg_arg_string( 2, message, sizeof message - 1 );         switch( message[7] )         {             // -- %!MRAD_terwin ; %!MRAD_ctwin ; %!MRAD_rounddraw             case 'c', 't', 'r' : return PLUGIN_HANDLED;         }         return PLUGIN_CONTINUE;     }
__________________

Last edited by Arkshine; 09-06-2007 at 11:45.
Arkshine is offline
hebusletroll
Senior Member
Join Date: Apr 2006
Old 09-06-2007 , 15:22   Re: Block Terrorist and CT win sound.
Reply With Quote #3

Thank you Arkshine. I will try this now

See you later.
hebusletroll is offline
hebusletroll
Senior Member
Join Date: Apr 2006
Old 09-07-2007 , 03:05   Re: Block Terrorist and CT win sound.
Reply With Quote #4

Quote:
Originally Posted by hebusletroll View Post
Thank you Arkshine. I will try this now

See you later.
Yeah, work fine ! Thank you !
hebusletroll is offline
Ardonicek
Senior Member
Join Date: Feb 2013
Location: My home
Old 08-26-2013 , 15:52   Re: Block Terrorist and CT win sound.
Reply With Quote #5

What about messages for hostage rescue, bomb ?
__________________
Latest plugin: dHUD Round | Timeleft
Ardonicek is offline
Send a message via ICQ to Ardonicek Send a message via Skype™ to Ardonicek
Shooting King
RAAASENGAN
Join Date: Mar 2012
Location: India
Old 08-27-2013 , 11:01   Re: Block Terrorist and CT win sound.
Reply With Quote #6

The same way but Send Audio will have different Arguments
PHP Code:
%!MRAD_rescued        
%!MRAD_BOMBPL
%!MRAD_BOMBDEF 
__________________
As every time said, don't ever UNDERESTIMATE me.

Donate - Here

Last edited by Shooting King; 08-27-2013 at 11:03.
Shooting King 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 16:09.


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