Raised This Month: $ Target: $400
 0% 

[ HELP ] Change weapon primary attack sound?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 10-27-2015 , 13:19   [ HELP ] Change weapon primary attack sound?
Reply With Quote #1

How to block the primary attack sound of weapon and add a custom sound?
I searched the forum and found it, just not quite know how to use, for example:

PHP Code:
#include < amxmodx >
#include < hamsandwich >

new const FIRE_SOUND[][] = {"weapons/weapon_fire.wav"}

public 
plugin_init()
{
    
register_plugin("Plugin""Version""Author")
    
RegisterHam(Ham_Weapon_PrimaryAttack"weapon_name""fw_PrimaryAttack"1)
}

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

public 
fw_PrimaryAttack(weapon)
{
    new 
player get_pdata_cbase(Weapon414)

    if(
g_has_weapon[player])
    {
        
emit_sound(playerCHAN_WEAPONFIRE_SOUND[0], VOL_NORMATTN_NORM0PITCH_NORM)
    }

__________________








CrazY. is offline
 


Thread Tools
Display Modes

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 18:08.


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