AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Block Terrorist and CT win sound. (https://forums.alliedmods.net/showthread.php?t=60539)

hebusletroll 09-06-2007 11:35

Block Terrorist and CT win sound.
 
Hello :D

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 ? ;)

Arkshine 09-06-2007 11:41

Re: Block Terrorist and CT win sound.
 
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;     }

hebusletroll 09-06-2007 15:22

Re: Block Terrorist and CT win sound.
 
Thank you Arkshine. I will try this now :D

See you later.

hebusletroll 09-07-2007 03:05

Re: Block Terrorist and CT win sound.
 
Quote:

Originally Posted by hebusletroll (Post 528022)
Thank you Arkshine. I will try this now :D

See you later.

Yeah, work fine ! Thank you !

Ardonicek 08-26-2013 15:52

Re: Block Terrorist and CT win sound.
 
What about messages for hostage rescue, bomb ?

Shooting King 08-27-2013 11:01

Re: Block Terrorist and CT win sound.
 
The same way but Send Audio will have different Arguments
PHP Code:

%!MRAD_rescued        
%!MRAD_BOMBPL
%!MRAD_BOMBDEF 



All times are GMT -4. The time now is 16:09.

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