function weaponsound(){
localplayer_weapons = Entity.GetWeapons(Entity.GetLocalPlayer()); // получения оружия
localplayer_index = Entity.GetLocalPlayer();
attacker = Event.GetInt("attacker");
attacker_index = Entity.GetEntityFromUserID(attacker);
if(localplayer_weapons == "оружие" && attacker_index == localplayer_index){
Sound.Play("путь к звуку");
}
}
Global.RegisterCallback("player_hurt", "weaponsound");