PDA

View Full Version : [L4D] Mode / Map Vote


ChillyWI
04-22-2009, 04:32
I posted this on the Steam forums as well, but I think it could be done pretty easily here. It's quite simple... add a 2 part voting plugin that allows the players to vote on a map and mode.


Admin calls l4dvote_callvote.
Players are allowed to vote on their desired mp_gamemode (coop, versus, survival).
Once a mode wins, they're allowed to vote on their desired map.
Once a map wins, the plugin switches game types and changes maps.

To make it work even better, you'd need a config that specifies the modes and maps:
l4dvote {
"versus" {
"maxplayers" "8"
"minplayers" "5"
"maps" {
"Dead Air" "l4d_vs_airport01_greenhouse"
"Blood Harvest" "l4d_vs_farm01_hilltop"
"No Mercy" "l4d_vs_hospital01_apartment"
"Death Toll" "l4d_vs_smalltown01_caves"
}
}
"survival" {
"maxplayers" "4"
"minplayers" "1"
"maps" {
"Dead Air - Greenhouse" "l4d_airport01_greenhouse"
"Dead Air - Offices" "l4d_airport02_offices"
etc...
}
}
"coop" {
"maxplayers" "4"
"minplayers" "1"
"maps" {
"Dead Air" "l4d_airport01_greenhouse"
"Blood Harvest" "l4d_farm01_hilltop"
"No Mercy" "l4d_hospital01_apartment"
"Death Toll" "l4d_smalltown01_caves"
}
}
}

A couple of cvars would also be great additions:
l4dvote_randomoptions [1-6] (the number of maps displayed in the vote)
l4dvote_changetime [now|mapend|campaignend]

Each mode in the config could also have an "execconfig" part that would run whichever config is listed, which would easily allow per-gamemode configs.

Obviously it would take a bit to put it all together, but the initial part (vote for mode, vote for map, take action) is pretty straightforward. I think this would be a big hit on all the servers that don't use lobbies.

Damizean
04-22-2009, 08:30
Actually, I made the plugin for my server that unifies all those features, both the game mode enforcer, campaign manager and other additional stuff is on one plugin.

However, I don't leave the game mode vote start only for admins, instead, I have a public menu wich allows users to vote mode, difficulty, campaign, and other options such as disable melee (well, when it worked) and such.

I don't know if I should release it, though, as some of my code is poor (I've recently started working with Sourcemod), but if anyone's interested in taking a look, I could share once I do the proper changes for survival :/

ChillyWI
04-22-2009, 11:12
I'd love to see this. I would just go through and try stripping out the code I didn't need.

losting
01-01-2011, 15:54
http://img192.**************/img192/8934/votevy.jpg

http://img192.**************/img192/8934/votevy.jpg