Code
#include <amxmodx>
#include <hamsandwich>
new const g_sound[]="sound/welcome.wav"//путь к звуку
new cons g_attacksound[]="sound/attack.wav"//путь к звуку
public plugin_precache()
{
precache_sound(g_sound)
precache_sound(g_sound)
}
public plugin_init()
{
register_plugin("x","x","x")
RegisterHam(Ham_TakeDamage,"player","fwHamTDmg")
}
public client_putinserver(id)
{
client_cmd(id,"spk ^"%s^"",g_sound)
}
public fwHamTDmg(id)
{
emit_sound(id,CHAN_VOICE,g_attacksound,1.0,ATTN_NORM,0,PITCH_NORM)
}