Difference between revisions of "ZPSSwapteam Plugin"
(Created page with "This ZPS plugin allows players to swap their team once during a round. There are admin/donator flags that can be used for this and it also allows for more than one swap (if de...") |
|||
| Line 2: | Line 2: | ||
== How It Works == | == How It Works == | ||
| − | + | Essentially, this plugin works to swap a players team by moving them to spectator then moving them to the other team. This was done because directly moving a player from one team to another did not work very well, the HUD would not properly change, and other odd issues would occur from a direct swap. The only way to fix this was to switch them to spec then whatever team was desired. | |
== Code and Plugin Download == | == Code and Plugin Download == | ||
| − | |||
Below is the download link and code for the plugin: | Below is the download link and code for the plugin: | ||
*[https://github.com/Silenci0/ZPSSwapteam ZPSSwapteam Plugin] | *[https://github.com/Silenci0/ZPSSwapteam ZPSSwapteam Plugin] | ||
| + | |||
| + | == How To Install Plugin == | ||
| + | To install the plugin, simply download the files, unzip them, and then copy the addons folder into your game server's main directory. This will add ALL of the files into your game's "addons/sourcemod" directories. If asked to merge folders, click yes. If asked to overwrite, click yes. There are several cvars that this plugin uses and they are as follows: | ||
| + | |||
| + | |||
| + | <nowiki> | ||
| + | // Command used on the server for players/admins to swap teams. | ||
| + | // - | ||
| + | // Default: "swapmyteam" | ||
| + | sm_swapmyteam_cmd "swapmyteam" | ||
| + | |||
| + | // Count down timer (in seconds) before the swapteam is disabled for the rest of the round. | ||
| + | // - | ||
| + | // Default: "300.0" | ||
| + | // Minimum: "0.000000" | ||
| + | sm_swapmyteam_cooldown "300.0" | ||
| + | |||
| + | // Flag necessary for admins to use this functionality whenever they want . | ||
| + | // - | ||
| + | // Default: "s" | ||
| + | sm_swapmyteam_flag "s" | ||
| + | |||
| + | // The number of players that need to be on the server to enable this ability. | ||
| + | // - | ||
| + | // Default: "4.0" | ||
| + | // Minimum: "0.000000" | ||
| + | sm_swapmyteam_max_players "4.0" | ||
| + | |||
| + | // The number of players on the server in which this ability is disabled. | ||
| + | // - | ||
| + | // Default: "2.0" | ||
| + | // Minimum: "0.000000" | ||
| + | sm_swapmyteam_min_players "2.0" | ||
| + | |||
| + | </nowiki> | ||
| + | |||
| + | |||
| + | This plugin will generate a configuration file with these cvars in it, but one has also been included for convenience in the download. The defaults should work out of the box, but you should edit them to fit your needs. To disable it, just remove the plugin. This plugin only works for ZPS, but can be modified to work for other games (keep in mind, that most games can do a direct swap if you are intending to use this elsewhere, such as in games like TF2). | ||
== Setup == | == Setup == | ||
| − | |||
This plugin does not require any special configs or setup to use (outside of Sourcemod/Metamod of course). Simply move the plugin files to the correct folders into "~/addons/sourcemod/" of your ZPS game directory and it should start working automatically. | This plugin does not require any special configs or setup to use (outside of Sourcemod/Metamod of course). Simply move the plugin files to the correct folders into "~/addons/sourcemod/" of your ZPS game directory and it should start working automatically. | ||
Revision as of 13:33, 1 April 2017
This ZPS plugin allows players to swap their team once during a round. There are admin/donator flags that can be used for this and it also allows for more than one swap (if desired). This plugin also has a player threshold in which it activates/deactivates that you can also set for your server's needs.
How It Works
Essentially, this plugin works to swap a players team by moving them to spectator then moving them to the other team. This was done because directly moving a player from one team to another did not work very well, the HUD would not properly change, and other odd issues would occur from a direct swap. The only way to fix this was to switch them to spec then whatever team was desired.
Code and Plugin Download
Below is the download link and code for the plugin:
How To Install Plugin
To install the plugin, simply download the files, unzip them, and then copy the addons folder into your game server's main directory. This will add ALL of the files into your game's "addons/sourcemod" directories. If asked to merge folders, click yes. If asked to overwrite, click yes. There are several cvars that this plugin uses and they are as follows:
// Command used on the server for players/admins to swap teams.
// -
// Default: "swapmyteam"
sm_swapmyteam_cmd "swapmyteam"
// Count down timer (in seconds) before the swapteam is disabled for the rest of the round.
// -
// Default: "300.0"
// Minimum: "0.000000"
sm_swapmyteam_cooldown "300.0"
// Flag necessary for admins to use this functionality whenever they want .
// -
// Default: "s"
sm_swapmyteam_flag "s"
// The number of players that need to be on the server to enable this ability.
// -
// Default: "4.0"
// Minimum: "0.000000"
sm_swapmyteam_max_players "4.0"
// The number of players on the server in which this ability is disabled.
// -
// Default: "2.0"
// Minimum: "0.000000"
sm_swapmyteam_min_players "2.0"
This plugin will generate a configuration file with these cvars in it, but one has also been included for convenience in the download. The defaults should work out of the box, but you should edit them to fit your needs. To disable it, just remove the plugin. This plugin only works for ZPS, but can be modified to work for other games (keep in mind, that most games can do a direct swap if you are intending to use this elsewhere, such as in games like TF2).
Setup
This plugin does not require any special configs or setup to use (outside of Sourcemod/Metamod of course). Simply move the plugin files to the correct folders into "~/addons/sourcemod/" of your ZPS game directory and it should start working automatically.
This version of the plugin was compiled on SM 1.7.3, so it should work for Sourcemod 1.7.3 or later. If you need this for an older/specialized version of Sourcemod, you may want to compile the plugin (script files are included) for your version of Sourcemod.
All of this is provided "as is". While this plugin should not cause harm, any harm caused by the plugin, user handling, or anything else Vertigo Gaming and all associated coders are not responsible for it. Use at your own risk!