Switch a players teams, Swap two players, view current teams and teams as of last round, swap directly with a player on the other team, change to any team at any time, as an admin or a player, pause/unpause the game, unscramble and swap whole teams, and more.
This started as a compilation of the ideas and code from three other plugins, but has grown considerably since then.
It offers an Admin menu and a players menu to help with team switching and spectator control during a game.
Big thanks to the other authors on here, for providing the ideas as well as the plugins to spark this project;
The ideas and code basis for the team/player swapping capabilities comes from the TeamSWITCH
plugin by SkyDavid (djromero)
The players panel concept and code basis comes from l4d_teamspanel
The spectator control concept and code basis comes from SpecStaysSpec
Admin Menu Items:
Player Menu Items:
- Switch Player - bring up a menu with all the in game players to let you select one, then choose what team to move them to.
- Swap Players - brings up a menu to let you select a player, then another menu that show all the players not on the same team as the first player. When selected, the two players will be swapped.
- Unscramble Teams - Attempts to move players to the teams they were on at the end of the last round. Does not account for order changing because of score.
- Swap Both Teams - Swap all infected and survivors to the other team
- Pause Game - pause the game
- Unpause Game - unpause the game, with a 5 second count down
- Current Teams - Displays a panel that show all the current team/spectator alignments, including bots
- Last Round Teams - Display a panel that shows the alignment of all the players and teams at the end of the last round played.
- Debugging options - Displays a menu that allow you to set various debugging options for the plugin.
- Switch to Spectator - Will immediately switch you to spectator
- Switch to Survivor - Will immediately switch you to survivor
- Switch To Infected - will immediately switch you to the infected team.
- Swap teams with someone - Displays a menu of all the players on the other team(s), and when you select one, it will then display a menu to that player, asking them if they want to swap with you. This is a great way to straighten out those jumbled up teams at the map change.
- View Current Teams Info - Displays a panel that show all the current team/spectator alignments, including bots
- View Last Round Teams Info - Display a panel that shows the alignment of all the players and teams at the end of the last round played.
- Keeps track of who was on spectator at the end of each round, and attempts to keep them there if they join a team at the beginning of the next round.
- sm_switchplayer <playerindex> [1=Spectator;2=Survivor;3=Infected]
- sm_swapplayers <playerindex1> <playerindex2>
- sm_debug [0 = Off|1 = PrintToChat|2 = LogToFile|3 = PrintToChat AND LogToFile]
To install: Place the l4d2_bwa_teams_panel.smx in the Sourcemod\Plugins folder, and the l4d2_bwa_teams_panel.txt in the Sourcemod\Gamedata folder.
- [FIXED] - Display for last rounds players showing incorrectly
- [ADDED] - Pause/Unpause game functionality on Admin Menu
- [ADDED] - Unscramble Players feature on Admin Menu - attempts to place all the players back on the teams they were on at the end of the previous round
- [ADDED] - Swap Teams: Swaps all the Survivors and Infected to the other team
- [ADDED] - Admin Menu Sorting text file for convenience
- Added cvar 'l4d2_BwA_TeamPanel_AllowPubs' Allow public access to commands [0 = No|1 = Yes], default = 1(yes). The plugin does not create a config, just add this to your server config if you want it.
- [ADDED] - cvar 'l4d2_BwA_SelectTeam_From_Panel' Allow Team Switching from panel [0 = No|1 = Yes], default = 1(yes). The plugin does not create a config, just add this to your server config if you want it.
- [ADDED] - As per the above ConVar, you can now switch teams by selecting the 1, 2 or (3) keys while the panel is displayed, if the above is set to on.
- Removed the superfluous MaxClients, MAX_SURVS AND MAX_INF displays at bottom of panel.
- [FIXED] - Compiler warning(sm 1.3.6 stable): "function "SwapWithMe" should return a value".
- [ADDED] - Team Headings on panel are numbered to match team numbers (1,2 and 3).
- [ADDED] - Some of the warning/information returns have better information now.
- [ADDED] - Indicator next to player names on panel for dead players "*", and who is the current tank, if there is one "[Tank]"
- [ADDED] - cvar 'l4d2_BwA_Print_Chat_MsgType'"Determine the type and frequency of information printed to the in game chat [0 = none|1 = simple messages|2 = verbose color coded messages]"
- [ADDED] - cvar 'l4d2_BwA_Show_ClientID'"Show the clientid next to the player name in the panel [0 = No|1 = Yes] - Default = 1"
- [ADDED] - cvar 'l4d2_BwA_TeamPanel_EnablePause' "Enable/Disable this plugins pause feature (default = 1) [0 = disabled|1 = enabled]"
- [ADDED] - Enabled plugin to run in L4D1