Здесь прописаны названия моих файлов т.е названия моих песен.Вам нужно заменить их на свои. Лучше всего все названия сделать одинаковыми только пронумеровать их,например,как у меня VogueServ.
Допустим у вас 20 песен, 10 для выйгрыша t и 10 для ct , назовем их к примеру "Sound", переименуйте все ваши песни на sound1,sound2 и тд.
Создайте папку допустим с названием roundsound. Путь cstrike/sound/misc/roundsound и закиньте туда свои песни.
Теперь прописываем в файле roundsound.sma так: -----------------------------------------------------------------------
//RoundSound.amxx -by PaintLancer
#include
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/roundsound/sound1")
case 2: client_cmd(0,"spk misc/roundsound/sound2")
case 3: client_cmd(0,"spk misc/roundsound/sound3")
case 4: client_cmd(0,"spk misc/roundsound/sound4")
case 5: client_cmd(0,"spk misc/roundsound/sound5")
case 6: client_cmd(0,"spk misc/roundsound/sound6")
case 7: client_cmd(0,"spk misc/roundsound/sound7")
case 8: client_cmd(0,"spk misc/roundsound/sound8")
case 9: client_cmd(0,"spk misc/roundsound/sound9")
case 10: client_cmd(0,"spk misc/roundsound/sound10")
}
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/roundsound/sound11")
case 2: client_cmd(0,"spk misc/roundsound/sound12")
case 3: client_cmd(0,"spk misc/roundsound/sound13")
case 4: client_cmd(0,"spk misc/roundsound/sound14")
case 5: client_cmd(0,"spk misc/roundsound/sound15")
case 6: client_cmd(0,"spk misc/roundsound/sound16")
case 7: client_cmd(0,"spk misc/roundsound/sound17")
case 8: client_cmd(0,"spk misc/roundsound/sound18")
case 9: client_cmd(0,"spk misc/roundsound/sound19")
case 10: client_cmd(0,"spk misc/roundsound/sound20")
}
return PLUGIN_HANDLED
}
public plugin_precache()
{
precache_sound("misc/roundsound/sound1.wav")
precache_sound("misc/roundsound/sound2.wav")
precache_sound("misc/roundsound/sound3.wav")
precache_sound("misc/roundsound/sound4.wav")
precache_sound("misc/roundsound/sound5.wav")
precache_sound("misc/roundsound/sound6.wav")
precache_sound("misc/roundsound/sound7.wav")
precache_sound("misc/roundsound/sound8.wav")
precache_sound("misc/roundsound/sound9.wav")
precache_sound("misc/roundsound/sound10.wav")
precache_sound("misc/roundsound/sound11.wav")
precache_sound("misc/roundsound/sound12.wav")
precache_sound("misc/roundsound/sound13.wav")
precache_sound("misc/roundsound/sound14.wav")
precache_sound("misc/roundsound/sound15.wav")
precache_sound("misc/roundsound/sound16.wav")
precache_sound("misc/roundsound/sound17.wav")
precache_sound("misc/roundsound/sound18.wav")
precache_sound("misc/roundsound/sound19.wav")
precache_sound("misc/roundsound/sound20.wav")
return PLUGIN_CONTINUE
}
-------------------------------------------------------------------------