Hey
i have added a Headshot and Nutshot message based on Hitlocations but it would be nice to have also a sound.
i tried with --> PlaySoundOnPlayer(Client, "mp_killconfirm_tags_pickup");
But nothing happens.
wtf i'm doing wrong? Any help would be very nice.
i have added a Headshot and Nutshot message based on Hitlocations but it would be nice to have also a sound.
i tried with --> PlaySoundOnPlayer(Client, "mp_killconfirm_tags_pickup");
But nothing happens.
wtf i'm doing wrong? Any help would be very nice.
Code:
using System;
using System.Collections.Generic;
using Addon;
namespace HeadshotSound
{
public class Main : CPlugin
{
public override int OnPlayerDamaged(ServerClient attacker, ServerClient victim, string weapon, int damage, string damageMod, HitLocations hitLocation)
{
if (damage >= victim.Other.Health && attacker != victim && victim.XUID != attacker.XUID)
{
if (hitLocation == HitLocations.Head)
{
PlaySoundOnPlayer(attacker, "mp_killconfirm_tags_pickup");
}
}
return base.OnPlayerDamaged(attacker, victim, weapon, damage, damageMod, hitLocation);
}
}
}