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

[L4D] game mode changer


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Sharft 6
Member
Join Date: Oct 2008
Plugin ID:
1278
Plugin Version:
1
Plugin Category:
Server Management
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    allows players to open a vote for a game mode e.g. coop, versus, survival
    Old 11-17-2009 , 06:55   [L4D] game mode changer
    Reply With Quote #1

    Description
    When a player types !gamemode into chat they will be shown a menu with a list of game modes to choose from. After choosing a game mode a vote menu will be shown to all players asking to change the game mode. If the vote is successful the game mode will be changed and a map vote will be brought up.

    Say Commands
    !gamemode // will show a menu containing the available game modes

    Admin Commands
    sm_cancelvote // will cancel any sm votes currently running (requires vote admin flag)
    sm_changegamemode // allows admin to choose a gamemode & map without voting (requires change map admin flag)

    The following commands change the game mode and open a map menu
    (require change map admin flag)
    sm_coop
    sm_versus
    sm_survival
    sm_teamscavenge
    sm_teamversus
    sm_realism
    sm_mutation

    ConVars
    sm_advertisegamemodechanger // Default 0
    sm_modevotetime // Default 20
    sm_mapvotetime // Default 20
    sm_coopenabled // Default 1
    sm_versusenabled // Default 1
    sm_survivalenabled // Default 1
    sm_teamscavengeenabled // Default 1
    sm_teamversusenabled // Default 1
    sm_realismenabled // Default 1
    sm_mutationenabled // Default 1

    Supported Games
    Left 4 Dead
    Left 4 Dead 2

    Changelog
    v2
    - added a warning so that players can't change the game mode to the one they are already playing.
    - added a map vote that will be activated after the players have decided to change the game mode.
    v3
    - added the automatic function of choosing a random map when nobody votes.
    - added l4d2 game mode "realism" (untested)
    v4
    - added a menu for administrators to change the game mode without voting
    - added the rest of the l4d2 game modes (untested)
    v5
    - condensed all the say commands into a menu that can be opened with !gamemode
    - added sm_<gamemode> commands for admins with changemap privileges
    - using sm_cvar mp_gamemode to change the game mode
    v6
    - commented out all of the administrator commands as they were buggy
    - added some code to redraw the map vote menu in case it doesn't show up the first time around
    v7
    - added a command to allow admins to cancel the vote
    - moved the change game mode command to execute just before the map change
    - deleted the menu redraw thing and added a 1 second delay between game mode change vote and map vote.
    v8
    - fixed all the admin commands
    - added a control variable to adjust game mode vote time and map vote time
    v9
    - added control variables to enable and disable game modes.
    - added support for mutation. (
    untested)
    - added The Sacrifice to the map menus.
    v10
    - Added new maps for l4d2. (untested)
    - Added a campagin menu so that the map menu isn't so cluttered.
    - Added a convar to advertise the server to players.
    V11
    - Added Campagin "Death Toll" for l4d2. (untested)
    v12
    - Fixed a bug with advertising. (thanks GrmL4D)
    - Changed "sm_advertiseplugin" convar to "sm_advertisegamemodechanger".
    - added map 4 from "blood harvest".
    - added map 2 from "the sacrifice".
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_gamemodechanger.sp - 5086 views - 26.2 KB)

    Last edited by Sharft 6; 11-24-2011 at 04:33.
    Sharft 6 is offline
    monkman
    Senior Member
    Join Date: Jul 2007
    Location: Killadelphia
    Old 11-22-2009 , 13:19   Re: [L4D] game mode changer
    Reply With Quote #2

    i tried this and the gamemode changed but no map vote at all. so whatever map we were on it stayed right where we were standing. there were no objectives to do.
    monkman is offline
    Sharft 6
    Member
    Join Date: Oct 2008
    Old 11-22-2009 , 17:27   Re: [L4D] game mode changer
    Reply With Quote #3

    have you tried v2? the map vote is working for me

    also if the gamemode changes but the map vote doesn't come up you can manually start one of those built in map votes.

    Last edited by Sharft 6; 11-22-2009 at 17:57.
    Sharft 6 is offline
    mizokun2007
    New Member
    Join Date: Nov 2009
    Old 11-23-2009 , 09:47   Re: [L4D] game mode changer
    Reply With Quote #4

    I want to use this plugins for l4d2.

    please support left 4 dead 2 mode "realizm "
    mizokun2007 is offline
    monkman
    Senior Member
    Join Date: Jul 2007
    Location: Killadelphia
    Old 11-23-2009 , 14:12   Re: [L4D] game mode changer
    Reply With Quote #5

    Quote:
    Originally Posted by Sharft 6 View Post
    have you tried v2? the map vote is working for me
    i must have had an older version. i redownloaded, installed and it works. nice plugin. i use this for a private server so no lobby so this is perfect.

    also i would like to see this for l4d2. good deal.

    Last edited by monkman; 11-23-2009 at 14:25.
    monkman is offline
    Sharft 6
    Member
    Join Date: Oct 2008
    Old 11-23-2009 , 17:54   Re: [L4D] game mode changer
    Reply With Quote #6

    ok but i need to know the map name that goes with each game mode. for campaign and versus the first map for the campaign is fine. survival needs each individual map name because they don't link. I'm not sure how realizm works but if each map connects to the other then i only need the first map.

    This is how i get the vote map list for l4d1:
    Code:
    if(strcmp(gameMode, "coop", false) == 0)
        {
            AddMenuItem(menu, "l4d_hospital01_apartment", "Mercy Hospital");
            AddMenuItem(menu, "l4d_garage01_alleys", "Crash Course");
            AddMenuItem(menu, "l4d_smalltown01_caves", "Death Toll");
            AddMenuItem(menu, "l4d_airport01_greenhouse", "Dead Air");
            AddMenuItem(menu, "l4d_farm01_hilltop", "Blood Harvest");
        }
        else if(strcmp(gameMode, "versus", false) == 0)
        {
            AddMenuItem(menu, "l4d_vs_hospital01_apartment", "Mercy Hospital");
            AddMenuItem(menu, "l4d_garage01_alleys", "Crash Course");
            AddMenuItem(menu, "l4d_vs_smalltown01_caves", "Death Toll");
            AddMenuItem(menu, "l4d_vs_airport01_greenhouse", "Dead Air");
            AddMenuItem(menu, "l4d_vs_farm01_hilltop", "Blood Harvest");
    
        }
        else if(strcmp(gameMode, "survival", false) == 0)
        {
            AddMenuItem(menu, "l4d_hospital02_subway", "Generator Room");
            AddMenuItem(menu, "l4d_hospital03_sewers", "Gas Station");
            AddMenuItem(menu, "l4d_hospital04_interior", "Hospital");
            AddMenuItem(menu, "l4d_vs_hospital05_rooftop", "Rooftop");
            
            AddMenuItem(menu, "l4d_garage01_alleys", "Bridge (crashcourse)");
            AddMenuItem(menu, "l4d_garage02_lots", "Truck Depot");
            
            AddMenuItem(menu, "l4d_smalltown02_drainage", "Drains");
            AddMenuItem(menu, "l4d_smalltown03_ranchhouse", "Church");
            AddMenuItem(menu, "l4d_smalltown04_mainstreet", "Street");
            AddMenuItem(menu, "l4d_vs_smalltown05_houseboat", "Boathouse");
            
            AddMenuItem(menu, "l4d_airport02_offices", "Crane");
            AddMenuItem(menu, "l4d_airport03_garage", "Construction Site");
            AddMenuItem(menu, "l4d_airport04_terminal", "Terminal");
            AddMenuItem(menu, "l4d_vs_airport05_runway", "Runway");
            
            AddMenuItem(menu, "l4d_farm02_traintunnel", "Warehouse");
            AddMenuItem(menu, "l4d_farm03_bridge", "Bridge (bloodharvest)");
            AddMenuItem(menu, "l4d_vs_farm05_cornfield", "Farmhouse");
            
            AddMenuItem(menu, "l4d_sv_lighthouse", "Lighthouse");
        }
    If there is a more dynamic way please let me know.

    Last edited by Sharft 6; 11-23-2009 at 17:56.
    Sharft 6 is offline
    monkman
    Senior Member
    Join Date: Jul 2007
    Location: Killadelphia
    Old 11-23-2009 , 18:08   Re: [L4D] game mode changer
    Reply With Quote #7

    this is the coop map list. i will try to get the rest for the other game modes.

    c1m1_hotel
    c1m2_streets
    c1m3_mall
    c1m4_atrium
    c2m1_highway
    c2m2_fairgrounds
    c2m3_coaster
    c2m4_barns
    c2m5_concert
    c3m1_plankcountry
    c3m2_swamp
    c3m3_shantytown
    c3m4_plantation
    c4m1_milltown_a
    c4m2_sugarmill_a
    c4m3_sugarmill_b
    c4m4_milltown_b
    c4m5_milltown_escape
    c5m1_waterfront
    c5m2_park
    c5m3_cemetery
    c5m4_quarter
    c5m5_bridge
    monkman is offline
    Sharft 6
    Member
    Join Date: Oct 2008
    Old 11-23-2009 , 21:07   Re: [L4D] game mode changer
    Reply With Quote #8

    ok l4d2 is now supported. go ahead and give it a whirl.
    Sharft 6 is offline
    monkman
    Senior Member
    Join Date: Jul 2007
    Location: Killadelphia
    Old 11-24-2009 , 00:28   Re: [L4D] game mode changer
    Reply With Quote #9

    these are all the gamemodes for l4d2:
    coop,versus,teamscavenge,teamversus,realism,s urvival

    i tried it but it is always on coop. if i go to versus or survival it is coop. the vote comes up and then the maplist but it does not chane the gamemode. it changes to the level you pick
    monkman is offline
    mizokun2007
    New Member
    Join Date: Nov 2009
    Old 11-24-2009 , 00:29   Re: [L4D] game mode changer
    Reply With Quote #10

    I tried this plugin with L4D2 . But I couldn't change a gamemode.
    mizokun2007 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 02:04.


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