AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Block T/CT Win and Hostages has not been rescued messages (https://forums.alliedmods.net/showthread.php?t=185535)

RapZzw3rR 05-18-2012 18:26

Block T/CT Win and Hostages has not been rescued messages
 
Hi, I want to put you one question. How can I block the messages "Terrorists win!", "Counter-Terrorists win!" and "Hostages has not been rescued!" ?
Thanks.

Devil259 05-18-2012 18:46

Re: Block T/CT Win and Hostages has not been rescued messages
 
Register the message then block it.

RapZzw3rR 05-19-2012 09:31

Re: Block T/CT Win and Hostages has not been rescued messages
 
PHP Code:

public plugin_init( )

    
register_message(get_user_msgid("TextMsg"), "msgTextMsg");


PHP Code:

public msgTextMsg( )
{
    static 
sz_TextMsg[22];
    
get_msg_arg_string(2sz_TextMsg21);
    
    if( 
equal(sz_TextMsg"#Terrorists_Win") )
    {
        return 
PLUGIN_HANDLED;
    }
    else if( 
equal(sz_TextMsg"#CTs_Win") )
    {
        return 
PLUGIN_HANDLED;
    }
    else if( 
equal(sz_TextMsg"#Hostages_Not_Rescued") )
    {
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;


Is correctly?

Devil259 05-19-2012 18:29

Re: Block T/CT Win and Hostages has not been rescued messages
 
Test by yourself.

If it works, it is correct.


All times are GMT -4. The time now is 00:26.

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