How i put a kill voice in the game Fps multiplayer?

Hi, I try so much times put a kill voice in my fps multiplayer game when we kill a enemie, but without success.
Someone here can help me with this?
How I make a correctly script to make this works fine?
Exemples to make this please!

Regards,
Nuno Miguel Silva

So you basically need an integer to store the current streak. That is 0 by default, and after each kill, it increases by 1. However in most games there is a timer that resets the streak after some time. So for example you can get a double kill and with an extra kill 5 minutes later you won’t get a triple kill, only a kill.

public AudioSource audioPlayer;
public AudioClip[] killStreakSounds;

int currentStreak = 0;
float killTimer = 0;
const float streakReset = 5; // Change this according to your needs

void Update
{
   if(killTimer > 0)
   {
      killTimer -= Time.deltaTime;
      if(killTimer <= 0) ResetStreak();
   }
}

void OnKill() // Call this when you kill someone
{
   audioPlayer.PlayOneShot(killStreakSounds[currentStreak]);
   if(currentStreak < killStreakSounds.Length - 1) currentStreak++;
   killTimer = streakReset;
}

void ResetStreak() // Call this when your character dies
{
   currentStreak = 0;
   killTimer = 0;
}

Don’t forget to add the AudioSource reference and the AudioClips. The AudioClips have to be in an increasing order (kill, double kill, triple kill, etc).

Of course, you’re right! I will make a new script, following this script, but according to my scripts, now it makes more sense! Sorry for the bad questions! Thank you! Have a nice day!