Zombie Taunts

Zombie Taunts 1.0.1

Нет прав для скачивания
Код:
#include < amxmodx >
#include < reapi >

#tryinclude < biohazard >

#define SPEAK_DELAY    20.0

new Float:flTauntTime[ 33 ];

new const gZombieTaunts[ ][ ] =
{
    "biohazard/braaains.wav",
    "biohazard/brains.wav",
    "biohazard/brains2.wav",
    "biohazard/feeed.wav",
    "biohazard/join2.wav",
    "biohazard/joinusss.wav",
    "biohazard/mustfeed.wav"
};

public plugin_init( )
{
    register_plugin( "[Fork] Zombie Taunts", "1.0.1", "tuty" );
  
    RegisterHookChain(RG_CBasePlayer_PreThink, "CBasePlayer_PreThink_Post", true);
}

public plugin_precache( )
{
    new i;
  
    for( i = 0; i < sizeof gZombieTaunts; i++ )
    {
        precache_sound( gZombieTaunts[ i ] );
    }
}

public CBasePlayer_PreThink_Post( id )
{
    if ( is_user_alive( id ) && is_user_zombie( id ) )
    {
        new Float:flGameTime = get_gametime( );
      
        if ( flGameTime - flTauntTime[ id ] > SPEAK_DELAY )
        {
            flTauntTime[ id ] = flGameTime;
              
            emit_sound( id, CHAN_VOICE, gZombieTaunts[ random_num( 0, charsmax( gZombieTaunts ) ) ], random_float( 0.7, 1.0 ), ATTN_NORM, 0, PITCH_NORM );
        }
    }
}
Назад
Верх