←  Szukam pluginu

AMXX.pl: Support AMX Mod X i SourceMod

»

Wyłączenie informacji o rzuconym granacie


Najlepsza odpowiedź psilocybe 19.12.2014 16:39

#include < amxmodx >

enum _:CvarBits (<<=1) {
    BLOCK_RADIO = 1,
    BLOCK_MSG
};

new g_pCvar;

public plugin_init( ) {
    register_plugin( "'Fire in the hole' blocker", "1.0", "xPaw" );
    
    g_pCvar = register_cvar( "sv_fith_block", "3" );
    
    register_message( get_user_msgid( "TextMsg" ),   "MessageTextMsg" );
    register_message( get_user_msgid( "SendAudio" ), "MessageSendAudio" );
}

public MessageTextMsg( )
    return ( get_msg_args( ) == 5 && IsBlocked( BLOCK_MSG ) ) ? GetReturnValue( 5, "#Fire_in_the_hole" ) : PLUGIN_CONTINUE;

public MessageSendAudio( )
    return IsBlocked( BLOCK_RADIO ) ? GetReturnValue( 2, "%!MRAD_FIREINHOLE" ) : PLUGIN_CONTINUE;

GetReturnValue( const iParam, const szString[ ] ) {
    new szTemp[ 18 ];
    get_msg_arg_string( iParam, szTemp, 17 );
    
    return ( equal( szTemp, szString ) ) ? PLUGIN_HANDLED : PLUGIN_CONTINUE;
}

bool:IsBlocked( const iType )
    return bool:( get_pcvar_num( g_pCvar ) & iType );


cvar

sv_fith_block

        0 - Nothing is blocked.
        1 - Radio is blocked.
        2 - Message is blocked.
        3 - Radio and message is blocked.
Przejdź do postu

  • +
  • -
Michal21 - zdjęcie Michal21 19.12.2014

Szukam pluginu który wyłączy na chat info o rzuconym granacie. Na serwerze mam zombie plague 4.3

Odpowiedz

  • +
  • -
ogieR8 - zdjęcie ogieR8 19.12.2014

Podpowiem, istnieje w sieci plugin, który zmienia nazwę tej wiadomości, użyj go.. usuwając całkowicie tą informację, może pomoże. 

 

Np to http://amxx.pl/topic...in-the-hole-pl/;)

Odpowiedz

  • +
  • -
Najlepsza odpowiedź psilocybe - zdjęcie psilocybe 19.12.2014

#include < amxmodx >

enum _:CvarBits (<<=1) {
    BLOCK_RADIO = 1,
    BLOCK_MSG
};

new g_pCvar;

public plugin_init( ) {
    register_plugin( "'Fire in the hole' blocker", "1.0", "xPaw" );
    
    g_pCvar = register_cvar( "sv_fith_block", "3" );
    
    register_message( get_user_msgid( "TextMsg" ),   "MessageTextMsg" );
    register_message( get_user_msgid( "SendAudio" ), "MessageSendAudio" );
}

public MessageTextMsg( )
    return ( get_msg_args( ) == 5 && IsBlocked( BLOCK_MSG ) ) ? GetReturnValue( 5, "#Fire_in_the_hole" ) : PLUGIN_CONTINUE;

public MessageSendAudio( )
    return IsBlocked( BLOCK_RADIO ) ? GetReturnValue( 2, "%!MRAD_FIREINHOLE" ) : PLUGIN_CONTINUE;

GetReturnValue( const iParam, const szString[ ] ) {
    new szTemp[ 18 ];
    get_msg_arg_string( iParam, szTemp, 17 );
    
    return ( equal( szTemp, szString ) ) ? PLUGIN_HANDLED : PLUGIN_CONTINUE;
}

bool:IsBlocked( const iType )
    return bool:( get_pcvar_num( g_pCvar ) & iType );


cvar

sv_fith_block

        0 - Nothing is blocked.
        1 - Radio is blocked.
        2 - Message is blocked.
        3 - Radio and message is blocked.
Odpowiedz