SpyRexx 143 Posted October 17, 2015 Share Posted October 17, 2015 (edited) Denumire: roundsound.amxx Descriere: Cu ajutorul acestui plugin puteti sa va setati ca la sfarsitul fiecarei runde (indiferent de harta) sa se auda o melodie, bine-inteles melodia o puteti seta cum doriti voi. Instalare: Copiati urmatorul cod intr-un notepad #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/sunet1") case 1: client_cmd(0,"spk misc/sunet2") case 2: client_cmd(0,"spk misc/sunet3") } return PLUGIN_HANDLED } public ct_win() { new rand = random_num(0,2) client_cmd(0,"stopsound") switch(rand) { case 0: client_cmd(0,"spk misc/sunet4") case 1: client_cmd(0,"spk misc/sunet5") case 2: client_cmd(0,"spk misc/sunet6") } return PLUGIN_HANDLED } public plugin_precache() { precache_sound("misc/sunet4.wav") precache_sound("misc/sunet5.wav") precache_sound("misc/sunet6.wav") precache_sound("misc/sunet1.wav") precache_sound("misc/sunet2.wav") precache_sound("misc/sunet3.wav") return PLUGIN_CONTINUE } Modificati sunet1 , sunet2 ... cu sunetele dvs. [sunetele se pun in cstrike/sound/misc] Acum in notepad unde ati copiat codul si modificat numele sunetelor cu ale dvs. faceti click pe FILE -> Save AS si puneti la nume: roundsound.sma Intrati Aici , adaugati plugin-ul , il compilati dupa care descarcati fisierul in format .amxx ! Fisierul roundsound.amxx il puneti in cstrike/addons/amxmodx/plugins Intrati in cstrike/addons/amxmodx/configs/plugins.ini si adaugati pe ultima linie: roundsound.amxx Acum intrati in cstrike/sound/misc si adaugati acolo sunetele dvs. sunet1.wav sunet2.wav sunet3.wav sunet4.wav sunet5.wav sunet6.wav , in cazul dvs. sunetele cu numele care le-ati adaugat si in fisierul sursa. PS: Sunetele trebuie sa fie in format .wav , mono si pe 8 bits. Pentru a le converti intrati aici: Aici Edited October 17, 2015 by SpyRexx Link to comment Share on other sites More sharing options...
Recommended Posts