#include <amxmodx>

public plugin_init() 
{ 
  register_plugin("RoundSound","1.0","PaintLancer")
  register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")
  register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")  
}

public t_win()
{
  new rand = random_num(1,10)

  client_cmd(0,"stopsound")

  switch(rand)
  {
    case 1: client_cmd(0,"spk misc/t-electro1")
    case 2: client_cmd(0,"spk misc/t-electro2")
    case 3: client_cmd(0,"spk misc/t-electro3")
    case 4: client_cmd(0,"spk misc/t-electro4")
    case 5: client_cmd(0,"spk misc/t-electro5")
    case 6: client_cmd(0,"spk misc/t-electro6")
    case 7: client_cmd(0,"spk misc/t-electro7")
    case 8: client_cmd(0,"spk misc/t-electro8")    
    case 9: client_cmd(0,"spk misc/t-electro9")
    case 10: client_cmd(0,"spk misc/t-electro10")
  }

  return PLUGIN_HANDLED
}

public ct_win()
{
  new rand = random_num(1,10)

  client_cmd(0,"stopsound")

  switch(rand)
  {
    case 1: client_cmd(0,"spk misc/ct-electro1")
    case 2: client_cmd(0,"spk misc/ct-electro2")
    case 3: client_cmd(0,"spk misc/ct-electro3")
    case 4: client_cmd(0,"spk misc/ct-electro4")
    case 5: client_cmd(0,"spk misc/ct-electro5")
    case 6: client_cmd(0,"spk misc/ct-electro6")
    case 7: client_cmd(0,"spk misc/ct-electro7")
    case 8: client_cmd(0,"spk misc/ct-electro8")    
    case 9: client_cmd(0,"spk misc/ct-electro9")
    case 10: client_cmd(0,"spk misc/ct-electro10")
  }

  return PLUGIN_HANDLED
}

public plugin_precache() 
{
  precache_sound("misc/ct-electro1.wav")
  precache_sound("misc/ct-electro2.wav")
  precache_sound("misc/ct-electro3.wav")
  precache_sound("misc/ct-electro4.wav")
  precache_sound("misc/ct-electro5.wav")
  precache_sound("misc/ct-electro6.wav")
  precache_sound("misc/ct-electro7.wav")
  precache_sound("misc/ct-electro8.wav")
  precache_sound("misc/ct-electro9.wav")
  precache_sound("misc/ct-electro10.wav")
  precache_sound("misc/t-electro1.wav")
  precache_sound("misc/t-electro2.wav")
  precache_sound("misc/t-electro3.wav")
  precache_sound("misc/t-electro4.wav")
  precache_sound("misc/t-electro5.wav")
  precache_sound("misc/t-electro6.wav")
  precache_sound("misc/t-electro7.wav")
  precache_sound("misc/t-electro8.wav")
  precache_sound("misc/t-electro9.wav")
  precache_sound("misc/t-electro10.wav")



  return PLUGIN_CONTINUE
}
