Raised This Month: $ Target: $400
 0% 

HeadShot Sounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mifuntm
Senior Member
Join Date: Feb 2008
Location: in space...
Old 05-09-2010 , 15:30   Re: HeadShot Sounds
Reply With Quote #1

Code:
#include < amxmodx >

new const g_szSounds[ ][ ] = {
    "cyr4x/bezdech.wav",
    "cyr4x/cyr4x_001.wav",
    "cyr4x/cyr4x_006.wav",
    "cyr4x/mk.wav",
    "cyr4x/zobacz.wav"
}

public plugin_init()
    register_event( "DeathMsg", "EventDeathMsg", "a", "3=1" );

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

public EventDeathMsg( ) {
    new iKiller = read_data( 1 ), iVictim = read_data( 2 );

//  client_cmd( iKiller, "stopsound" ); // not needed
//  client_cmd( iVictim, "stopsound" );
    
    new iSound = random_num( 0, sizeof g_szSounds );
    
    client_cmd( iKiller, "spk %s", g_szSounds[ iSound ] );
    client_cmd( iVictim, "spk %s", g_szSounds[ iSound ] );
}




work nice

Thanks!
__________________
Only God can judge me...
Mifuntm 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 03:37.


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