Raised This Month: $ Target: $400
 0% 

Blocking or replacing weapon sounds


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Kuma77
Senior Member
Join Date: Sep 2014
Location: Behind PC
Old 10-04-2014 , 02:10   Re: Blocking or replacing weapon sounds
Reply With Quote #5

Quote:
Originally Posted by neverminde View Post
You cant do it with other weapons except knife.
There are some methods for block animation and all weapon sounds at the same time. ( not cool )
Also you can create new weapon with same animation, ammo bpammo num etc. This method allow set any sound you want.
true i found this code

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>

new new_knife_sound_ct[] = "weapons/newknife_hitwall1.wav"
new old_knife_sound_ct[] = "weapons/knife_hitwall1.wav"
new new_knife_sound_t[] = "weapons/newknife_hitwall1.wav"
new old_knife_sound_t[] = "weapons/knife_hitwall1.wav"

new new_knife_sound_ct_resource[] = "weapons/newknife_hitwall1.wav"
new old_knife_sound_ct_resource[] = "weapons/knife_hitwall1.wav"
new new_knife_sound_t_resource[] = "weapons/newknife_hitwall1.wav"
new old_knife_sound_t_resource[] = "weapons/knife_hitwall1.wav"

public plugin_init()
{
    
register_forward(FM_EmitSound"FmEmitSound")
}

public 
plugin_precache()
{
    
precache_sound(new_knife_sound_ct_resource)
    
precache_sound(old_knife_sound_ct_resource)
    
precache_sound(new_knife_sound_t_resource)
    
precache_sound(old_knife_sound_t_resource)
}

public 
FmEmitSound(idchannel, const sample[], Float:volumeFloat:attenuationflagspitch)
{
    if(
equali(sampleold_knife_sound_ct))
    {
        
engfunc(EngFunc_EmitSoundidchannelnew_knife_sound_ctvolumeattenuationflagspitch)
    }
    if(
equali(sampleold_knife_sound_t))
    {
        
engfunc(EngFunc_EmitSoundidchannelnew_knife_sound_tvolumeattenuationflagspitch)
    }

__________________
SPACE TIME
Kuma77 is offline
 



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 17:29.


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