murgs210 Posted October 13, 2009 Report Share Posted October 13, 2009 #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(0,2) client_cmd(0,"stopsound") switch(rand) { case 0: client_cmd(0,"spk misc/twinnar") case 1: client_cmd(0,"spk misc/twinnar2") case 2: client_cmd(0,"spk misc/twinnar3") } return PLUGIN_CONTINUE } public ct_win() { new rand = random_num(0,2) client_cmd(0,"stopsound") switch(rand) { case 0: client_cmd(0,"spk misc/ctwinnar2") case 1: client_cmd(0,"spk misc/ctwinnar3") case 2: client_cmd(0,"spk misc/ctwinnar4") } return PLUGIN_CONTINUE } public plugin_precache() { precache_sound("misc/ctwinnar2.wav") precache_sound("misc/ctwinnar3.wav") precache_sound("misc/ctwinnar4.wav") precache_sound("misc/twinnar.wav") precache_sound("misc/twinnar2.wav") precache_sound("misc/twinnar3.wav") return PLUGIN_CONTINUE } ------------------------------------------------------------------------------------------------------------------------ Esmu galigs nuubs.. Vai saja viena faila ir iespejams ielikt 20 dziesmas??? Ja var tad ieliekat visu tekstu ka man vnlg kads bus dziesmas nosaukums pats parlabosu.. Paldies jau ieprieks.. Link to comment Share on other sites More sharing options...
Kiwix Posted October 13, 2009 Report Share Posted October 13, 2009 (edited) case X: - x vietā skaitlis (3,4 utt) un new rand = random_num(0,2) <<<cipara 2 vietā liec to, kura Tev ir pēdējā skaņa, piemēram 20 un to pašu pie ct... un beigās pie precache pieliec skaņu, lai nokačā no servera.... ------------------------------------------------------------------------------------- #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(0,3) client_cmd(0,"stopsound") switch(rand) { case 0: client_cmd(0,"spk misc/twinnar") case 1: client_cmd(0,"spk misc/twinnar2") case 2: client_cmd(0,"spk misc/twinnar3") case 3: client_cmd(0,"spk misc/twinnar4") } return PLUGIN_CONTINUE } public ct_win() { new rand = random_num(0,3) client_cmd(0,"stopsound") switch(rand) { case 0: client_cmd(0,"spk misc/ctwinnar2") case 1: client_cmd(0,"spk misc/ctwinnar3") case 2: client_cmd(0,"spk misc/ctwinnar4") case 3: client_cmd(0,"spk misc/ctwinnar5") } return PLUGIN_CONTINUE } public plugin_precache() { precache_sound("misc/ctwinnar2.wav") precache_sound("misc/ctwinnar3.wav") precache_sound("misc/ctwinnar4.wav") precache_sound("misc/ctwinnar5.wav") precache_sound("misc/twinnar.wav") precache_sound("misc/twinnar2.wav") precache_sound("misc/twinnar3.wav") precache_sound("misc/twinnar4.wav") return PLUGIN_CONTINUE } Edited October 13, 2009 by Kiwix Link to comment Share on other sites More sharing options...
murgs210 Posted October 13, 2009 Author Report Share Posted October 13, 2009 PLd palidzeja :10cm: Link to comment Share on other sites More sharing options...
Recommended Posts