Quote:
Originally Posted by neverminde
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(id, channel, const sample[], Float:volume, Float:attenuation, flags, pitch)
{
if(equali(sample, old_knife_sound_ct))
{
engfunc(EngFunc_EmitSound, id, channel, new_knife_sound_ct, volume, attenuation, flags, pitch)
}
if(equali(sample, old_knife_sound_t))
{
engfunc(EngFunc_EmitSound, id, channel, new_knife_sound_t, volume, attenuation, flags, pitch)
}
}
__________________