Thread: TeamSwitch
View Single Post
Author Message
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 02-20-2008 , 08:58   TeamSwitch
Reply With Quote #1

This is a fully mod-independent team switching plugin, which gives an admin the ability to switch players to the opposite team either immediately, when they die, or at the end of the round (where appropriate).
Players can also be switched to spectators.

TeamSwitch detects which mod it is being run on at startup and configures itself accordingly. In CS:Source, the cstrike extension's function is being used, so the players don't die and don't have to select their model again. In all other mods, the SourceMod API's function is used instead, so players will die if they aren't dead when switched.

If a dead player is chosen to be switched after death, they will be switched immediately.

The Admin menu looks like this:




When selecting "On Death" or "On Round end", the menu will show a flag for players who will be switched, like so:



The team names will be displayed correctly for each mod, e.g. in TF2 it's "Red" and "Blue".

If you don't like menus, you can also use these commands:
  • teamswitch <name>
  • teamswitch_death <name>
  • teamswitch_roundend <name>
  • teamswitch_spec <name>
The plugin has been tested to work with CS:Source, DoD:Source, TF2 and Empires, but it should work for every other Mod as well that uses the same team indices.

Note:
Various people have made additions to this plugin and posted them in this thread, e.g. changing player models in CS:S or admin log functionality.


Changes:
1.3:
  • teamswitch_spec command added
1.2:
  • Bugfix: the wrong client IDs were listed in the menu, so the wrong people got selected
Greetz
MGee
Attached Files
File Type: sp Get Plugin or Get Source (teamswitch.sp - 35078 views - 14.8 KB)
__________________
Ich hab nie behauptet dass ich kein Genie bin!
Mumble-Django: A web interface for Mumble

Last edited by MistaGee; 06-15-2009 at 06:50.
MistaGee is offline
Send a message via ICQ to MistaGee