Raised This Month: $12 Target: $400
 3% 

[L4D & L4D2] Vote Mode (2.2) [25-Sep-2023]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
2825
Plugin Version:
2.2
Plugin Category:
Server Management
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    83 
    Plugin Description:
    Allows players to vote change the game mode. Admins can force change the game mode.
    Old 02-28-2012 , 06:00   [L4D & L4D2] Vote Mode (2.2) [25-Sep-2023]
    Reply With Quote #1





    About:
    • Allows players to vote change the game mode.
    • Admins can force change the game mode.
    • Displays a menu listing game modes specified from a config.
    • 2 configs provided, one with Valve game modes and the other with community made mutations from the All Mutations Unlocked addon.


    Thanks:
    • Mr.RuyC and NanX - For help testing the plugin on their server.
    • n3wton and chundo - For source code (credits inside).
    • Rayman1103 and everyone who contributed to the All Mutations Unlocked addon.
    • disawar1 - For testing and Russian translations.
    • Mr. Man
    • ilyaadminman
    • Don't Fear The Reaper - German translations.


    Known Bugs:
    • Switching to coop from versus will put 4 players in spectator (unless you have 4+ coop).
    • Switching to versus with l4d_votemode_restart "2" causes only 1 round to play before changing chapter. Set the cvar to "1".


    Custom Menu and Config:
    • The menu is generated from a key value config
    • The config must be saved to l4d_votemode.cfg in your servers \left4dead\addons\sourcemod\data\ folder.
    • Each section ("Coop" in this example) is displayed as an option. Each key ("Bleed Out") is listed and will change the game mode to it's value ("mutation3").
    Code:
    "gamemodes"
    {
    	"Coop"
    	{
    		"Realism"                  "realism"
    		"Bleed Out"                "mutation3"
    	}
    }


    Commands:

    PHP Code:
    // All players
    sm_votemode      // Displays a menu to vote the game into a different mode.

    // Admins only (requires "z" flag)
    sm_forcemode     // Allows admins to force the game into a different mode.
    sm_passmode      // Allows admins to pass a current vote.
    sm_vetomode      // Allows admins to veto a current vote.

    // Examples:
    // You can also vote/force the game mode by specifying the mode, for example:
    sm_votemode realism
    sm_forcemode mutation12 


    Cvars:

    Saved to l4d_votemode.cfg in your servers \left4dead\cfg\sourcemod\ folder.

    PHP Code:
    // 0=No, 1=Display in the Server Commands of admin menu.
    l4d_votemode_admin_menu "1"

    // Players with these flags can vote to change the game mode.
    l4d_votemode_admin_flag ""

    // Specify the gamemode to reset when all players have disconnected. Empty string = Don't reset.
    l4d_votemode_reset "coop"

    // 0=No restart, 1=With 'changelevel' command.
    l4d_votemode_restart "1"

    // How long the vote should be visible.
    l4d_votemode_timeout "30.0"

    // Vote Mode plugin version.
    l4d_votemode_version 


    Changes:
    Code:
    2.2 (25-Sep-2023)
        - Added 0.1 second delay between changing mode and switching map, to allow other plugins to detect mode change. Thanks to "Alex101192" for reporting.
        - Changed cvar "l4d_votemode_restart" to remove round restart method. Will default to changelevel method.
        - This is to prevent errors with various mutations that need a full map change in order to work correctly.
        - Update is from February 2023 but never published. Thanks to "Alex101192" for testing back then.
    
    2.1 (07-Dec-2022)
        - Potentially fixed cvar "l4d_votemode_reset" resetting the gamemode when connecting from a lobby. Thanks to "Mika Misori" for reporting.
    
    2.0 (05-Dec-2022)
        - Re-wrote major parts of the plugin to use structs for storing the data. No more limitation on number mutations.
        - Now correctly changes map on gamemodes that are only playable on selected maps. See the "l4d_votemode.cfg" file and "holdout" for more details.
        - Added command "sm_votemode_config" to generate a config file with all the available modes and mutations.
        - Added sounds when voting begins, passes and fails.
        - Updated "l4d_votemode.cfg" to support some new official gamemodes and those that only work on a select few maps.
        - Added Simplified Chinese (zho) and Traditional Chinese (chi) translations. Thanks to "NoroHime" for providing.
        - Updated "l4d_votemode_all.cfg" to support new modes from "Rayman1103's Mutation Mod".
        - Thanks to "Rayman1103" for showing where the gamemodes set specific map.
        - Thanks to "Alex101192" for reporting and lots of help testing.
    
    1.7 (15-Jan-2022)
        - Added cvar "l4d_votemode_reset" to reset the gamemode when the server is empty. Requested by "NoroHime".
    
    1.6 (04-Dec-2021)
        - Changes to fix warnings when compiling on SourceMod 1.11.
    
    1.5 (16-Jun-2020)
        - Added Hungarian translations to the "translations.zip", thanks to "KasperH" for providing.
        - Now sets Normal difficulty anytime the plugin changes gamemode. Thanks to "Alex101192" for reporting.
    
    1.4 (10-May-2020)
        - Fixed potential issues with some translations not being displayed in the right language.
        - Various changes to tidy up code.
    
    1.3 (30-Apr-2020)
        - Optionally uses Info Editor (requires version 1.8 or newer) to detect and change to valid Survival/Scavenge maps.
        - This method will also set the difficulty to Normal when switching to Survival/Scavenge maps.
        - This method only works when l4d_votemode_restart is set to 1.
        - Thanks to "Alex101192" for testing.
    
    1.2 (05-May-2018)
        - Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.
    
    1.1 (22-May-2012)
        - Added German translations - Thanks to "Don't Fear The Reaper".
    
    1.1 (10-May-2012)
        - Fixed votes potentially not displaying to everyone.
    
    1.0 (28-Feb-2012)
        - Initial release.


    Installation:
    1. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
    2. Download "l4d_votemode.cfg" and save to your servers \addons\sourcemod\data\ folder. This includes all game modes from Valve.
    3. Download "translations.zip" and extract the "translations" folder to your servers \addons\sourcemod\ folder.
    4. Optionally install Mission and Weapons - Info Editor (requires version 1.8 or newer) so switching to Survival/Scavenge will load the correct map for gamemode.
    5. Version 2.0+ requires SourceMod version 1.11 or newer.


    Optional:
    1. Alternatively download l4d_votemode_all.cfg. This includes all game modes from Valve and the All Mutations Unlocked addon.
    2. Save to your servers \addons\sourcemod\data\ folder. You must rename this file to l4d_votemode.cfg.
    3. You must have the above addon or the custom game modes will not work.

    Current Translations: English (en), German (de), Hungarian (hu), Russian (ru), Simplified Chinese (zho), Traditional Chinese (chi).
    Attached Files
    File Type: cfg l4d_votemode.cfg (2.1 KB, 541 views)
    File Type: cfg l4d_votemode_all.cfg (12.8 KB, 522 views)
    File Type: sp Get Plugin or Get Source (l4d_votemode.sp - 288 views - 44.0 KB)
    File Type: zip translations.zip (3.7 KB, 524 views)
    __________________

    Last edited by Silvers; 09-25-2023 at 02:06.
    Silvers is offline
    disawar1
    AlliedModders Donor
    Join Date: Aug 2011
    Location: Russian
    Old 02-28-2012 , 06:12   Re: [L4D & L4D2] Vote Mode (1.0) [28-Feb-2012]
    Reply With Quote #2

    cool ;)
    Note: All Mutations Unlocked all survival mutation not working, I think they will broke after some update.
    __________________
    disawar1 is offline
    Dushess
    Junior Member
    Join Date: Feb 2012
    Old 02-28-2012 , 09:20   Re: [L4D & L4D2] Vote Mode (1.0) [28-Feb-2012]
    Reply With Quote #3

    Thanks, this is what I was looking for...
    Dushess is offline
    Sev
    Veteran Member
    Join Date: May 2010
    Old 02-28-2012 , 12:19   Re: [L4D & L4D2] Vote Mode (1.0) [28-Feb-2012]
    Reply With Quote #4

    Great plugin.

    Just wish there was support for competitive VS modes like Confogl/Metafogl to easily change back to coop from these VS modes as they don't unload these plugins when changing back to Coop. Instead they keep them.
    Sev is offline
    Dushess
    Junior Member
    Join Date: Feb 2012
    Old 02-28-2012 , 14:34   Re: [L4D & L4D2] Vote Mode (1.0) [28-Feb-2012]
    Reply With Quote #5

    And I have, when downloading custom mode(*** Daddy), was a outreach in the main menu
    And when map loaded, i often see CAMPAIGN.

    Last edited by Dushess; 02-28-2012 at 14:35.
    Dushess is offline
    Mr. Man
    Veteran Member
    Join Date: Mar 2011
    Location: Huh?
    Old 02-29-2012 , 18:42   Re: [L4D & L4D2] Vote Mode (1.0) [28-Feb-2012]
    Reply With Quote #6

    The one I've been waiting for!
    Mr. Man is offline
    Dushess
    Junior Member
    Join Date: Feb 2012
    Old 03-01-2012 , 15:53   Re: [L4D & L4D2] Vote Mode (1.0) [28-Feb-2012]
    Reply With Quote #7

    WTF, my server not work with versus-mode - it's a reason for crashes from main menu at loading Versus with this plugin...
    Can anyone help?

    Last edited by Dushess; 03-01-2012 at 15:53.
    Dushess is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 03-01-2012 , 16:01   Re: [L4D & L4D2] Vote Mode (1.0) [28-Feb-2012]
    Reply With Quote #8

    Crashes at what point? Does it ever work? What is l4d_votemode_restart set to? Probably some plugin you have causing crash.
    __________________
    Silvers is offline
    skull_
    Junior Member
    Join Date: Mar 2012
    Old 03-03-2012 , 14:38   Re: [L4D & L4D2] Vote Mode (1.0) [28-Feb-2012]
    Reply With Quote #9

    for some reason, when i choose versus mode, right after i start mission, 20+ special infected spawn, same class.. and i see this type of error in server's console, many times:
    CreatePlayerBot: Unable to create bot Spitter - CreateFakeClient() returned NULL.

    Last edited by skull_; 03-03-2012 at 14:44.
    skull_ is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 03-03-2012 , 14:57   Re: [L4D & L4D2] Vote Mode (1.0) [28-Feb-2012]
    Reply With Quote #10

    Probably the game mode, not the plugins fault.
    __________________
    Silvers is offline
    Reply


    Thread Tools
    Display Modes

    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 05:49.


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