RegAdminCmd( "sm_unpause", Command_UnpauseGame, ADMFLAG_GENERIC, "Unpause the game") RegAdminCmd( "sm_pause", Command_PauseGame, ADMFLAG_GENERIC, "Pause the game") RegAdminCmd( "sm_swapteams", Command_SwapTeams, ADMFLAG_GENERIC, "Swap ALL Infected with ALL Survivors") RegAdminCmd( "sm_unscramble", Command_Unscramble, ADMFLAG_GENERIC, "Unscramble the teams") RegAdminCmd( "sm_swapplayers", Command_SwapPlayers, ADMFLAG_GENERIC, "sm_swapplayers ") RegAdminCmd( "sm_switchplayer", Command_SwitchPlayer, ADMFLAG_GENERIC, "sm_switchplayer ") RegConsoleCmd( "switchmenu", SwitchMenu) Shows the menu with the join commands, swap command, and view team panel command RegConsoleCmd( "swapwithme", SwapWithMe) Swap teams with another player with their consent RegConsoleCmd( "jointeam", JoinRandomTeam) RegConsoleCmd( "joininfected", JoinInfectedTeam) RegConsoleCmd( "joinsurvivor", JoinSurvivorTeam) RegConsoleCmd( "joinspec", JoinSpectatorTeam) Join various teams directly, team must have open slot RegConsoleCmd( "showlastteams", ShowLastRoundTeamPanel) Show panel with team members as of the end of the last round RegConsoleCmd( "showcurrteams", ShowCurrTeamPanel) Shows panel with current team members, index, and teams they are on RegConsoleCmd( "aboutpanel", Show_About) PrepSDKCall_AddParameter( SDKType_Bool, SDKPass_Plain) PrepSDKCall_SetFromConf(gConf, SDKConf_Signature, "TakeOverBot") PrepSDKCall_AddParameter( SDKType_CBasePlayer, SDKPass_Pointer) PrepSDKCall_SetFromConf(gConf, SDKConf_Signature, "SetHumanSpec") ThrowError( "Could not load gamedata/l4d2_bwa_teams_panel.txt") ThrowError("Could not load gamedata/l4d2_bwa_functions.txt") GConf = LoadGameConfigFile( "l4d2_bwa_teams_panel") gConf = LoadGameConfigFile("l4d2_bwa_functions") LogActivity( 0, "PluginStarted:TeamsPanel") SetFailState( "Use this in Left 4 Dead 1 or 2 only.") īuildPath( Path_SM, logFilePath, sizeof(logFilePath), "logs/l4d2_bwa_teams_panel.log") If (( ! StrEqual(game_name, "left4dead2", false)) & ( ! StrEqual(game_name, "left4dead", false))) GetGameFolderName(game_name, sizeof(game_name))
Name = "Jesters Players Panel and Switch Menu (Unscramble Compat)",ĭescription = "Shows players on each team and spectators", Arrays to store the player info from the end of the last round New Handle :sdkTakeOverBot = INVALID_HANDLE New Handle :sdkSetPlayerSpec = INVALID_HANDLE Sourcemod/gamedata folderĬonst MAXPLAYERS_PLUSONE = MAXPLAYERS + 1 This plugin requires "l4d2_bwa_teams_panel.txt" to be in the.
#Sourcemod l4d2 multiple slots code#
Spectator control concept and some of the code comes from SpecStaysSpec by DieTeetasse Players panel concept and some of the code comes from l4d_teamspanel by OtterNas3 The ideas and basis for the team/player swapping capabilites comes from the TeamSWITCH plugin by SkyDavid (djromero) This is a simple switch menu and players panel to help with team switching and spectator control during a game.