#include < amxmodx > 
#include < zombieplague > 
#include < fakemeta > 

#define PLUGIN  "[ZP] Addon: Nemesis Sounds" 
#define VERSION "1.0" 
#define AUTHOR  "Doomsday" 

/* Это новые Звуки */ 
new const new_sounds[][] = 
{ 
    "zombie_plague/Nemesis/knife_deploy1.wav", 
    "zombie_plague/Nemesis/knife_hit1.wav", 
    "zombie_plague/Nemesis/knife_hit2.wav", 
    "zombie_plague/Nemesis/knife_hit3.wav", 
    "zombie_plague/Nemesis/knife_hit4.wav", 
    "zombie_plague/Nemesis/knife_hitwall1.wav", 
    "zombie_plague/Nemesis/knife_slash1.wav", 
    "zombie_plague/Nemesis/knife_slash2.wav", 
    "zombie_plague/Nemesis/knife_stab.wav" 
} 

/* Это старые, они должны соответствовать звукам в zombieplague.ini */ 
new const old_sounds[][] = 
{ 
    "weapons/knife_deploy1.wav", 
    "weapons/knife_hit1.wav", 
    "weapons/knife_hit2.wav", 
    "weapons/knife_hit3.wav", 
    "weapons/knife_hit4.wav", 
    "weapons/knife_hitwall1.wav", 
    "weapons/knife_slash1.wav", 
    "weapons/knife_slash2.wav", 
    "weapons/knife_stab.wav" 
} 

public plugin_init() 
{ 
    register_plugin(PLUGIN, VERSION, AUTHOR) 
     
    register_forward(FM_EmitSound, "fw_EmitSound"); 
} 

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

public fw_EmitSound(id, channel, const sound[]) 
{ 
    if(!is_user_alive(id) || zp_get_user_survivor(id)) 
        return FMRES_IGNORED 
         
    if(zp_get_user_nemesis(id)) 
    { 
        for(new i = 0; i < sizeof new_sounds; i++) 
        { 
            if(equal(sound, old_sounds[i])) 
            { 
                emit_sound(id, channel, new_sounds[i], 1.0, ATTN_NORM, 0, PITCH_NORM) 
                return FMRES_SUPERCEDE 
            } 
        } 
    } 
    return FMRES_IGNORED 
} 