RSSy MYGO.pl Opublikowano Marzec 24, 2019 o 18:26 RSSy Udostępnij Opublikowano Marzec 24, 2019 o 18:26 Description: This plugin is intended to play one random music on each new map start (the same one music will be played on round re-start). Only one song will be downloaded to client each map start, so it will reduce client connection delay. In this way, you can install infinite number of music tracks on your server without sacrificing connection speed (compared to: if you would download all files at once). Plugin will display menu to clients on each round start (can be disabled by "l4d_music_mapstart_showmenu" ConVar): - greetings and congratulation lines (see translation file) - 5. Stop music - 6. Play music again - 7. Volume - 8. Next track (in debug mode) Commands: sm_music - open music menu sm_music <arg> - play specific music by id, where arg should be 0 .. to max or -1 to play next index (Use together with #DEBUG 1 mode only!) sm_music_update - populate music list from config (use, if you replaced config file without server/plugin restart). Settings (ConVars):l4d_music_mapstart_enable - Enable plugin (1 - On / 0 - Off) l4d_music_mapstart_delay (default - 17) - Delay (in sec.) between player join and playing the music l4d_music_mapstart_showmenu - Show !music menu on round start? (1 - Yes, 0 - No) Music preparation & Optimization & Installation & Testing Spoiler Preparation of MP3 files - file names Ensure noone file has special characters like "long dash" () or so. - sample rate All MP3 files must be encoded in 44100 Hz sample rate, otherwise it may not play at all. To ensure, you can download MP3 Quality Modifier tool: https://www.inspire-soft.net/softwar...ality-modifier and re-encode all files at once. - file size Next, it is recommended every file will not be > 5 MB. in size (to improve download speed). To decrease the size, sort all your files by size, send the files > 5 MB to above tool and re-encode them in 128 (or 192) Kbit/s bitrate (select "constant" mode first).Preparation the list Download and unpack archive from the 1st post. Copy MP3 files to sound/valentine folder. Run (double-click) sound/valentine/create_list.bat file.Setup server to work with downloadable content ConVars in your cfg/server.cfg should be: Quote: sm_cvar sv_allowdownload "1" sm_cvar sv_downloadurl "http://your-content-server.com/game/left4dead/" /your-content-server.com/game/left4dead/sound/valentine/ <= here is your *.mp3 filesEdit greetings and congratulations see addons/sourcemod/translations/MusicMapStart.phrases.txt file, items: - Congratulation1 - Congratulation2 - Congratulation3Uploading files to server. Phase 1. 1. Upload "sound" folder to content-server 2. Upload "sound" folder to basic server. 3. Upload "sound" folder to your client's \steamapps\common\left 4 dead\left4dead\ folder (for test reasons). 4. Upload "addons" folder to basic server.Testing the music Edit addons\sourcemod\scripting\scripting\l4d_Musi cMapStart.sp file: Quote: #define DEBUG 0 replace by Quote: #define DEBUG 1 compile it, l4d_MusicMapStart.smx file copy to addons/sourcemod/plugins folder on server. Reboot the server. Join, wait until all sounds will be downloaded. Wait the menu (if it is not opened, enter !music in chat) Check that every sound is played correctly by pressing "Next track" menu item or !music -1 in chat. Remove or fix the broken tracks.Finalizing Return back initial line: Quote: #define DEBUG 0 re-compile the plugin and upload it to server. Remove "sound/valentine" folder from your steam client's game folder. Reboot the server. Join and ensure sound is correctly downloaded and played on map (round) start. Known bugs: - sometimes "PlayAgain" button is not working. You need to press it several times. (Reason is unknown) - some default game sounds interrupt music sound on map start, so you need to set large enough value for "l4d_music_mapstart_delay" ConVar (like > 10, by default == 17) (Walkaround is unknown) TODO: Add cookie for saving individual client's preferences for: - Volume level - Show this menu on start - Play music on start Credits: - Lux - for some suggestions on sound channel Attached Files MusicMapStart_v0.3.zip (6.6 KB) Wyświetl pełny artykuł Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi
Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto
Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.
Zarejestruj nowe konto
Załóż nowe konto. To bardzo proste!
Zarejestruj sięZaloguj się
Posiadasz już konto? Zaloguj się poniżej.
Zaloguj się