•  
     

RoundSound.sma

## PRA QUEM NÃO SABE ESTE PLUGIN FAZ TOCAR MUSICAS NO FIM DO ROUND ESTE É O PLUGIN SMA


Código: Selecionar todos

#include <amxmodx>

public plugin_init()
{
  register_cvar("cl_round_end", "1");
  register_plugin("Round Sond","1.1","PaintLancer&Sha!")
  register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")
  register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")
}

public t_win()
{
new no_winsound[32]
new i=1
while(i<31)
{
  get_user_info(i, "no_winsound", no_winsound, 31)

  if(!(str_to_num(no_winsound)))
  {
  new rand = random_num(0,4)
  client_cmd(i,"stopsound")
  switch(rand)
  {
    case 0: client_cmd(i,"spk RoundSound/win_tr1")
    case 1: client_cmd(i,"spk RoundSound/win_tr2")
    case 2: client_cmd(i,"spk RoundSound/win_tr3")
    case 3: client_cmd(i,"spk RoundSound/win_tr4")
    case 4: client_cmd(i,"spk RoundSound/win_tr5")
  }
  }
  i=i+1
}
return PLUGIN_HANDLED
}

public ct_win()
{
new no_winsound[32]
new i=1
while(i<31)
{
  get_user_info(i, "no_winsound", no_winsound, 31)

  if(!(str_to_num(no_winsound)))
  {
  new rand = random_num(0,4)
  client_cmd(i,"stopsound")
  switch(rand)
  {
    case 0: client_cmd(i,"spk RoundSound/win_ct1")
    case 1: client_cmd(i,"spk RoundSound/win_ct2")
    case 2: client_cmd(i,"spk RoundSound/win_ct3")
    case 3: client_cmd(i,"spk RoundSound/win_ct4")
    case 4: client_cmd(i,"spk RoundSound/win_ct5")
  }
  }
  i=i+1
}
return PLUGIN_HANDLED
}

public plugin_precache()
{
  precache_sound("RoundSound/win_ct1.wav")
  precache_sound("RoundSound/win_ct2.wav")
  precache_sound("RoundSound/win_ct3.wav")
  precache_sound("RoundSound/win_ct4.wav")
  precache_sound("RoundSound/win_ct5.wav")
  precache_sound("RoundSound/win_tr1.wav")
  precache_sound("RoundSound/win_tr2.wav")
  precache_sound("RoundSound/win_tr3.wav")
  precache_sound("RoundSound/win_tr4.wav")
  precache_sound("RoundSound/win_tr5.wav")
  return PLUGIN_CONTINUE
}