Raised This Month: $32 Target: $400
 8% 

[L4D/Any?] Map (round) Start Music Player (infinite tracks)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Plugin ID:
6484
Plugin Version:
1.3
Plugin Category:
Fun Stuff
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Download and play one random music on map start
    Old 03-24-2019 , 14:26   [L4D/Any?] Map (round) Start Music Player (infinite tracks)
    Reply With Quote #1

    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. Settings

    Settings menu:
    - 1. Volume
    - 2. Next track (in debug mode)
    - 2. Don't show this menu on map start
    - 3. Don't play music on next map
    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


    Known bugs:
    - sometimes "PlayAgain" button is not working. You need to press it several times.
    - 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
    Donate
    Donates are very appreciated and welcomed for further inspiration, make me happy, and make next updates came out more often:
    - Patreon (Paypal)
    - BitCoin
    - Ю.Money
    Attached Images
    File Type: jpg settings-1.jpg (50.2 KB, 1523 views)
    File Type: jpg settings-2.jpg (95.5 KB, 1097 views)
    File Type: jpg audacity0.jpg (54.7 KB, 979 views)
    File Type: jpg audacity1.jpg (48.3 KB, 984 views)
    Attached Files
    File Type: zip MusicMapStart_v1.3.zip (20.9 KB, 625 views)
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 06-25-2022 at 07:50.
    Dragokas is offline
    AirAndAir
    New Member
    Join Date: Mar 2019
    Location: China,Shanghai
    Old 03-29-2019 , 01:35   Re: [L4D/Any?] Round Start Music Player (infinite tracks)
    Reply With Quote #2

    //SourceMod Batch Compiler
    // by the SourceMod Dev Team


    //// l4d_MusicMapStart.sp
    // C:\L4D2 Versus\left4dead2\addons\sourcemod\scripting\ l4d_MusicMapStart.sp(58 ) : warning 207: unknown #pragma
    // C:\L4D2 Versus\left4dead2\addons\sourcemod\scripting\ l4d_MusicMapStart.sp(58 ) : error 038: extra characters on line
    // C:\L4D2 Versus\left4dead2\addons\sourcemod\scripting\ l4d_MusicMapStart.sp(63) : error 001: expected token: ";", but found "-identifier-"
    // C:\L4D2 Versus\left4dead2\addons\sourcemod\scripting\ l4d_MusicMapStart.sp(83) : error 010: invalid function or declaration
    // C:\L4D2 Versus\left4dead2\addons\sourcemod\scripting\ l4d_MusicMapStart.sp(88 ) : error 010: invalid function or declaration
    // C:\L4D2 Versus\left4dead2\addons\sourcemod\scripting\ l4d_MusicMapStart.sp(90) : error 010: invalid function or declaration
    // C:\L4D2 Versus\left4dead2\addons\sourcemod\scripting\ l4d_MusicMapStart.sp(92) : error 010: invalid function or declaration
    // C:\L4D2 Versus\left4dead2\addons\sourcemod\scripting\ l4d_MusicMapStart.sp(94) : error 010: invalid function or declaration
    // C:\L4D2 Versus\left4dead2\addons\sourcemod\scripting\ l4d_MusicMapStart.sp(96) : error 010: invalid function or declaration
    // C:\L4D2 Versus\left4dead2\addons\sourcemod\scripting\ l4d_MusicMapStart.sp(98 ) : error 010: invalid function or declaration
    // C:\L4D2 Versus\left4dead2\addons\sourcemod\scripting\ l4d_MusicMapStart.sp(102) : error 010: invalid function or declaration
    // C:\L4D2 Versus\left4dead2\addons\sourcemod\scripting\ l4d_MusicMapStart.sp(104) : error 001: expected token: ";", but found "-identifier-"
    // C:\L4D2 Versus\left4dead2\addons\sourcemod\scripting\ l4d_MusicMapStart.sp(120) : error 021: symbol already defined: "void"
    // C:\L4D2 Versus\left4dead2\addons\sourcemod\scripting\ l4d_MusicMapStart.sp(138 ) : error 017: undefined symbol "convar"
    // C:\L4D2 Versus\left4dead2\addons\sourcemod\scripting\ l4d_MusicMapStart.sp(138 ) : error 029: invalid expression, assumed zero
    // C:\L4D2 Versus\left4dead2\addons\sourcemod\scripting\ l4d_MusicMapStart.sp(138 ) : fatal error 127: too many error messages on one line
    //
    // Compilation aborted.
    // 15 Errors.
    //
    // Compilation Time: 0.72 sec
    // ----------------------------------------

    Can U Fix it?Thx.
    AirAndAir is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 03-29-2019 , 02:02   Re: [L4D/Any?] Round Start Music Player (infinite tracks)
    Reply With Quote #3

    It is sourcemod problem, not mine.

    Use: https://spider.limetech.io
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: Taiwan, Asia
    Old 06-15-2019 , 06:19   Re: [L4D/Any?] Round Start Music Player (infinite tracks)
    Reply With Quote #4

    wow, it really works!!!!!!!!!!!!!!!!!!
    wonderful, perfect and nice!!!!!!!!!!!!!!!!!!

    I thought this would never be possible in left 4 dead 1
    It makes server more fun
    Thanks for your great work really
    __________________

    Last edited by HarryPotter; 06-15-2019 at 06:19.
    HarryPotter is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: Taiwan, Asia
    Old 06-15-2019 , 08:53   Re: [L4D/Any?] Round Start Music Player (infinite tracks)
    Reply With Quote #5

    I tested in left4dead, all fine
    But when I tested in left4dead2, I found there are few different details.
    1.rewrite create_list.bat
    Spoiler

    2.ConVars in your cfg/server.cfg should be:
    -If you are l4d1
    sm_cvar sv_allowdownload "1"
    sm_cvar sv_downloadurl "http://your-content-server.com/game/left4dead/"
    -If you are l4d2
    sm_cvar sv_allowdownload "1"
    sm_cvar sv_downloadurl "http://your-content-server.com/game/left4dead2"

    3.client downloads two mp3 files once when joining the server
    I believe l4d2 server calls OnMapStart() twice
    so I modify below and it works
    PHP Code:
    public void OnPluginStart()
    {
     .
     .
     .
     .
      if(
    g_Engine == Engine_Left4Dead)
            
    OnMapStart();

    __________________

    Last edited by HarryPotter; 06-15-2019 at 16:45.
    HarryPotter is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 06-15-2019 , 15:10   Re: [L4D/Any?] Round Start Music Player (infinite tracks)
    Reply With Quote #6

    Thanks for fixes, I'll return to this plugin some time later.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    zomexf
    Junior Member
    Join Date: Jul 2019
    Old 07-10-2019 , 05:02   Re: [L4D/Any?] Round Start Music Player (infinite tracks)
    Reply With Quote #7

    Quote:
    Originally Posted by Dragokas View Post
    Thanks for fixes, I'll return to this plugin some time later.
    Errors:
    l4d_MusicMapStart.smx (Round start music): Error detected in plugin startup (see error logs)
    [SM] Exception reported: Cannot open config file "addons\sourcemod\data\music_mapstart.txt "!
    [SM] Blaming: l4d_MusicMapStart.smx

    Last edited by zomexf; 07-10-2019 at 05:23.
    zomexf is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 07-10-2019 , 13:53   Re: [L4D/Any?] Round Start Music Player (infinite tracks)
    Reply With Quote #8

    Quote:
    [SM] Exception reported: Cannot open config file "addons\sourcemod\data\music_mapstart.txt "!
    Error is clearly said you didn't put this file on the server at the specified place.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 07-11-2019 , 12:39   Re: [L4D/Any?] Round Start Music Player (infinite tracks)
    Reply With Quote #9

    No, because:

    Quote:
    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.
    music_mapstart.txt will be created automatically.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    zomexf
    Junior Member
    Join Date: Jul 2019
    Old 07-11-2019 , 13:49   Re: [L4D/Any?] Round Start Music Player (infinite tracks)
    Reply With Quote #10

    Thank you for your help
    zomexf is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 08:36.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode