Raised This Month: $12 Target: $400
 3% 

Auto Swap Team


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Experto
Member
Join Date: Jan 2008
Location: Brasil
Plugin ID:
2186
Plugin Version:
2.2.1
Plugin Category:
Gameplay
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    This plugin does the automatic exchange of teams according to the options selected (Este plugin faz a troca automática de times de acordo com as opções selecionadas)
    Unapprover:
    Reason for Unapproving:
    Author failed to correct error
    Old 01-22-2011 , 23:23   Auto Swap Team
    Reply With Quote #1

    :: Description ::

    This plugin does the automatic swap of teams according to the options selected.
    While most of the plugins to exchange only works with teams setting number of rounds, with the Auto Swap Team is
    can configure the automatic swap of five different ways. It also allows the restart of money, restart of deaths, restart of points
    and restart the weapons according to the team. Furthermore it is possible to make admins immune, and play sounds and messages
    warning to the players. Auto Swap Team also allows to add a normal player to the list of immunity. You can also choose the color of the messages.



    :: Types of Swap ::

    TIME (sm_autoswapteam_type = 1)
    Half the time set in mp_timelimit.
    Example:
    mp_timelimit 40
    The swap will take place after 20 minutes

    NUMBER OF ROUNDS (sm_autoswapteam_type = 2)
    In half of the value set in mp_maxrounds.
    Example:
    mp_maxrounds 30
    The swap will take place after 15 rounds

    NUMBER OF WINS (sm_autoswapteam_type = 3)
    In half of the value set in mp_winlimit.
    Example:
    mp_winlimit 16
    The swap will take place after one of the teams win 8 rounds

    NUMBER OF FRAG (sm_autoswapteam_type = 4)
    In half of the value set in mp_fraglimit.
    Example:
    mp_fraglimit 100
    The swap will take place after a player reaches 50 frags

    NO LIMIT (sm_autoswapteam_type = 5)
    For servers type dust2 forever. You can use the Auto Swap Team to make unlimited swaps, without changing the map.
    You must set how many rounds the swap should happen by the CVAR "sm_autoswapteam_maxround".
    Example:
    sm_autoswapteam_maxround 10
    The swap will take always every 10 rounds



    :: Commands ::

    // Includes steam player to the list of immunity
    //
    // Values for <immunity>:
    // 16 - SWAP
    // 8 - WEAPON
    // 4 - DEAD
    // 2 - FRAG
    // 1 - CASH
    //
    // To add immunity to more than one option sum their values
    sm_autoswapteam_immunity_add <steamId> <immunity>

    Example:
    SWAP
    sm_autoswapteam_immunity_add STEAM_0:12345 16
    SWAP + DEAD = 16 + 4 = 20
    sm_autoswapteam_immunity_add STEAM_0:12345 20
    WEAPON + CASH = 8 + 1 = 9
    sm_autoswapteam_immunity_add STEAM_0:12345 9


    // Remove steam player from list of immunity
    sm_autoswapteam_immunity_del <steamId>


    // List steam player of the list of immunity
    // If no STEAM is given, list all
    sm_autoswapteam_immunity_list [steamId]



    :: Options / CVar's ::

    Config file created automatically: cfg/sourcemod/autoswapteam.cfg

    OBS: The file autoswapteam.cfg is generated in Portuguese-BR. If you need the English version replace the contents of the file "cfg/sourcemod/autoswapteam.cfg" for the content of autoswapteamEN.txt available for download.

    Code:
    // This file was auto-generated by SourceMod (v1.3.7-dev)
    // ConVars for plugin "autoswapteam.smx"
     
    // Warning message before the swap? [0 = NO 1 = YES] 
    // - 
    // Default: "1" 
    // Minimum: "0.000000" 
    // Maximum: "1.000000" 
    sm_autoswapteam_advert_alert "1" 
     
    // Warning message in round? [0 = NO 1 = YES] 
    // - 
    // Default: "1" 
    // Minimum: "0.000000" 
    // Maximum: "1.000000" 
    sm_autoswapteam_advert_round "1" 
     
    // Warning message after the swap? [0 = NAO, 1 = SIM]
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    sm_autoswapteam_advert_swap "1"
     
    // On / Off Auto Swap Team. [0 = OFF, 1 = On] 
    // - 
    // Default: "1" 
    // Minimum: "0.000000" 
    // Maximum: "1.000000" 
    sm_autoswapteam_enable "1" 
     
    // Reset the money of admins after swap? [0 = NO 1 = YES] 
    // - 
    // Default: "0" 
    // Minimum: "0.000000" 
    // Maximum: "1.000000" 
    sm_autoswapteam_immune_cash "0" 
     
    // Reset the Deaths of admins after the swap? [0 = NO 1 = YES] 
    // - 
    // Default: "0" 
    // Minimum: "0.000000" 
    // Maximum: "1.000000" 
    sm_autoswapteam_immune_dead "0" 
     
    // Reset the score of admins after the swap? [0 = NO 1 = YES] 
    // - 
    // Default: "0" 
    // Minimum: "0.000000" 
    // Maximum: "1.000000" 
    sm_autoswapteam_immune_frag "0" 
     
    // Admins are immune to Auto Swap? [0 = NO 1 = YES] 
    // - 
    // Default: "0" 
    // Minimum: "0.000000" 
    // Maximum: "1.000000" 
    sm_autoswapteam_immune_swap "0" 
     
    // Reset the Weapons of admins after the swap? [0 = NO 1 = YES] 
    // - 
    // Default: "0" 
    // Minimum: "0.000000" 
    // Maximum: "1.000000" 
    sm_autoswapteam_immune_weapon "0"
     
    // When sm_autoswapteam_type = 5. 
    // Maximum number of rounds before the switch?
    // -
    // Default: "10"
    // Minimum: "1.000000"
    sm_autoswapteam_maxround "10"
     
    // Play sound alert? [0 = NO 1 = YES] 
    // - 
    // Default: "1" 
    // Minimum: "0.000000" 
    // Maximum: "1.000000" 
    sm_autoswapteam_playsound "1"
     
    // Reset the money after swap? [0 = NO 1 = YES] 
    // - 
    // Default: "1" 
    // Minimum: "0.000000" 
    // Maximum: "1.000000" 
    sm_autoswapteam_resetcash "0" 
     
    // Reset the Deaths after swap? [0 = NO 1 = YES] 
    // - 
    // Default: "1" 
    // Minimum: "0.000000" 
    // Maximum: "1.000000" 
    sm_autoswapteam_resetdead "0" 
     
    // Reset Frag after swap? [0 = NO 1 = YES] 
    // - 
    // Default: "1" 
    // Minimum: "0.000000" 
    // Maximum: "1.000000" 
    sm_autoswapteam_resetfrag "0" 
     
    // Reset Weapons after swap? [0 = NO 1 = YES] 
    // - 
    // Default: "1" 
    // Minimum: "0.000000" 
    // Maximum: "1.000000" 
    sm_autoswapteam_resetweapon "0" 
     
    // Play sound alert before the swap? [0 = NAO, 1 = SIM]
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    sm_autoswapteam_salert "1"
     
    // Define action for the score. [0 = KEEP, 1 = RESET, 2 = SWAP] 
    // - 
    // Default: "2" 
    // Minimum: "0.000000" 
    // Maximum: "1.000000" 
    sm_autoswapteam_scoretype "2" 
     
    // Address of the sound file - Alert
    // -
    // Default: "buttons/bell1.wav"
    sm_autoswapteam_sfile_alert "buttons/bell1.wav"
     
    // Address of the sound file - Round
    // -
    // Default: "hostage/huse/okletsgo.wav"
    sm_autoswapteam_sfile_round "hostage/huse/okletsgo.wav"
     
    // Address of the sound file - Swap
    // -
    // Default: "ambient/misc/brass_bell_C.wav"
    sm_autoswapteam_sfile_swap "ambient/misc/brass_bell_C.wav"
     
    // Play sound round? [0 = NAO, 1 = SIM]
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    sm_autoswapteam_sround "1"
     
    // Play sound after swap? [0 = NAO, 1 = SIM]
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    sm_autoswapteam_sswap "1"
     
    // Sets the type of Auto Swap. [1 = TIME, 2 = NUMBER OF ROUNDS, 3 = NUMBER OF WINS, 4 = NUMBER OF FRAG, 5 = NO LIMITS] 
    // - 
    // Default: "1" 
    // Minimum: "1.000000" 
    // Maximum: "5.000000" 
    sm_autoswapteam_type "1"


    :: Languages ::

    Languages included in the file autoswapteam.phrases.txt:

    -Português-BR (PT)
    -English (EN)

    To translate the messages into your language, simply add them to file "addons/SourceMod/translations/autoswapteam.phrases.txt".

    For example, adding messages in Spanish:

    Quote:
    "advert_time"
    {
    "#format" "{1:d}"
    "pt" "ATENCAO: Os times serao trocados apos {1} min!"
    "en" "WARNING: The teams will be exchanged after {1} minutes!"
    "es" "ADVERTENCIA: Los equipos se intercambiaron después de {1} min!"
    }

    "advert_will_swap"
    {
    "pt" "ATENCAO: Os Times serao trocados ao final desta rodada!"
    "en" "WARNING: The teams will be exchanged at the end of this round!"
    "es" "ADVERTENCIA: El Times se intercambiaron al final de esta ronda!"
    }
    But beware, do not delete words in brackets - {1} - or lines of formatting - "#format" "{1:d}" - , because the plugin may not work.

    Quote:
    "advert_time"
    {
    "#format" "{1:d}"
    "pt" "ATENCAO: Os times serao trocados apos {1} min!"
    "en" "WARNING: The teams will be exchanged after {1} minutes!"
    "es" "ADVERTENCIA: Los equipos se intercambiaron después de {1} min!"
    }
    To find out the possible languages open the file "addons/SourceMod/configs/languages.cfg".
    The active language is defined in the file "addons/SourceMod/configs/core.cfg" on "ServerLang" "en"



    :: Colored messages ::


    You can also choose the color of the messages. The colors available are:

    Regular colors: default, green, olive.
    Team colors: lightgreen, red, blue.

    Coloring the messages simply add the tags before of message in the file autoswapteam.phrases.txt

    Tags: {default}, {green}, {lightgreen}, {red}, {blue}, {olive}

    For example, messages in light green:

    ATENCAO: Os times serao trocados apos 10 min!
    WARNING: The teams will be exchanged after 10 minutes!
    Quote:
    "advert_time"
    {
    "#format" "{1:d}"
    "pt" "{lightgreen}ATENCAO: Os times serao trocados apos {1} min!"
    "en" "{lightgreen}WARNING: The teams will be exchanged after {1} minutes!"
    }
    Mixed colors:

    ATENCAO: Os times serao trocados apos 10 min!
    WARNING: The teams will be exchanged after 10 minutes!
    Quote:
    "advert_time"
    {
    "#format" "{1:d}"
    "pt" "{green}ATENCAO: {lightgreen}Os times serao trocados apos {green}{1} min!"
    "en" "{green}WARNING: {lightgreen}The teams will be exchanged after {green}{1} minutes!"
    }


    :: Change log ::

    >> 2.2.1 - 09-04-2011
    - Resolved problem precache of sounds that are not standard game

    >> 2.2.0 - 07-09-2011
    - Add options to turn sounds on or off individually
    - Add options to turn adverts on or off individually

    >> 2.1.3 - 06-25-2011
    - Add swap the bots
    - Add three different sounds:
    (1) Sound alert on how many rounds are left
    (2) Sound to warn it will be exchanged at the end of the round
    (3) Sound warning that the teams were switched

    >> 2.1.2 - 04-17-2011
    - Correction of the score when the score is zero (sm_autoswapteam_scoretype "1")

    >> 2.1.1 - 03-28-2011
    - Added color library to be used in the translation file
    - Fixed wrong count

    >> 2.1.0 - 03-12-2011
    - New option (sm_autoswapteam_type = 5). For servers type dust2 forever, never change the map. Now you can use the Auto Swap Team to make unlimited swaps.
    - Fix small bug, that caused the swap to be performed in the round wrong.

    >> 2.0.3 - 02-14-2011
    - Reimplement the code that resets the weapons.

    >> 2.0.2 - 02-13-2011
    - Fix a small bug. In the first round after the swap, the c4 disappeared, when sm_autoswapteam_resetweapon = "1".

    >> 2.0.1 - 02-05-2011
    - Fix a small bug. The bug was causing the reset the data of the admins, even though the options were turned off.

    >> 2.0.0 - 02-02-2011
    - Creation of the list of immunity for normal players

    >> 1.0.1 - 01-26-2011
    - Fixed the scoreboard after the exchange of teams
    - Added more configuration options of immunity to the admins

    >> 1.0.0 - 01-22-2011
    - Release of the plugin

    -This plugin was based on plugins "Swap Team" (see 1.0.0) and "CSS Auto Swap Teams" (see 2.3.1).
    -Colors Details on http://forums.alliedmods.net/showthread.php?t=96831.



    :: Installation ::

    - Copy the file "autoswapteam.smx" to the folder "addons/SourceMod/plugins/"
    - Copy the file "autoswapteam.phrases.txt" to the folder "addons/SourceMod/translations/"



    :: Upgrading ::

    - Run the command: sm plugins unload autoswapteam
    - Delete the file: "cfg/sourcemod/autoswapteam.cfg"

    - Copy the file "autoswapteam.smx" to the folder "addons/SourceMod/plugins/"
    - Copy the file "autoswapteam.phrases.txt" to the folder "addons/SourceMod/translations/"
    - Run the command: sm plugins load autoswapteam
    or restart the server



    :: Downloads ::
    Attached Files
    File Type: txt autoswapteam.phrases.txt (1.8 KB, 1771 views)
    File Type: txt autoswapteamEN.txt (3.8 KB, 1467 views)
    File Type: zip autoswapteam2.2.1.zip (25.0 KB, 3718 views)
    File Type: sp Get Plugin or Get Source (autoswapteam.sp - 1137 views - 25.9 KB)
    __________________
    My Plugins:
    -IP Block: This plugin block the entry in the server of players with same IP. Too is possible to config exceptions for some IPs
    -Auto Swap Team: This plugin does the automatic swap of teams according to the options selected
    -Welcome Sound: Plays sound of welcome for the players

    Last edited by Experto; 09-04-2011 at 21:30. Reason: new version 2.2.1
    Experto is offline
    DoPe^
    Veteran Member
    Join Date: Jul 2008
    Location: Denmark / Copenhagen
    Old 01-24-2011 , 10:02   Re: Auto Swap Team
    Reply With Quote #2

    so this plugin does the same as Gemeni's Halftime teamswitch (1.0.11)?

    http://forums.alliedmods.net/showthread.php?p=560574
    DoPe^ is offline
    Experto
    Member
    Join Date: Jan 2008
    Location: Brasil
    Old 01-24-2011 , 12:54   Re: Auto Swap Team
    Reply With Quote #3

    Quote:
    Originally Posted by DoPe^ View Post
    so this plugin does the same as Gemeni's Halftime teamswitch (1.0.11)?

    http://forums.alliedmods.net/showthread.php?p=560574
    Yes and no!
    This has more configuration options.
    From what I noticed immediately, by another description of this plugin, the differences are:

    - Set the exchange also for quantities of Frags
    - On / Off Message alerts
    - On / Off Immunity admins
    - On / Off Reset of Frags
    - On / Off Reset the Deads
    - On / Off Trading Score
    - Automatic creation of the settings file
    - Messages are internationalized, allowing translation into any language

    Also the code is updated.

    If you feel you need more options, please ask here that try to include in future versions
    __________________
    My Plugins:
    -IP Block: This plugin block the entry in the server of players with same IP. Too is possible to config exceptions for some IPs
    -Auto Swap Team: This plugin does the automatic swap of teams according to the options selected
    -Welcome Sound: Plays sound of welcome for the players
    Experto is offline
    Experto
    Member
    Join Date: Jan 2008
    Location: Brasil
    Old 01-25-2011 , 22:33   Re: Auto Swap Team
    Reply With Quote #4

    Dope,

    New version with more options!
    Nova versão com mais opções!

    1.0.1
    __________________
    My Plugins:
    -IP Block: This plugin block the entry in the server of players with same IP. Too is possible to config exceptions for some IPs
    -Auto Swap Team: This plugin does the automatic swap of teams according to the options selected
    -Welcome Sound: Plays sound of welcome for the players
    Experto is offline
    PStar
    Veteran Member
    Join Date: Mar 2008
    Old 01-26-2011 , 05:29   Re: Auto Swap Team
    Reply With Quote #5

    Why don't you put the cvars into a scrolable box? The post wouldn't be so long if you do that.
    PStar is offline
    DoPe^
    Veteran Member
    Join Date: Jul 2008
    Location: Denmark / Copenhagen
    Old 01-26-2011 , 08:33   Re: Auto Swap Team
    Reply With Quote #6

    i got 2 ideas would it be possible to do so if you are using the timelimit option that the round before the switch accure a sound will come, like "the teams will swap after this round" or something like that.

    and also, we are running a community with a vip donate function, so it would be awesome to add players to the immunity list.. the problem is we are running sourcebans which means the players need to be added manually.. is there a way your could make a cvar for adding players and removing players to an external cfg or ini file, or even better to a database
    DoPe^ is offline
    Experto
    Member
    Join Date: Jan 2008
    Location: Brasil
    Old 01-26-2011 , 15:44   Re: Auto Swap Team
    Reply With Quote #7

    Quote:
    Originally Posted by DoPe^ View Post
    i got 2 ideas would it be possible to do so if you are using the timelimit option that the round before the switch accure a sound will come, like "the teams will swap after this round" or something like that.

    and also, we are running a community with a vip donate function, so it would be awesome to add players to the immunity list.. the problem is we are running sourcebans which means the players need to be added manually.. is there a way your could make a cvar for adding players and removing players to an external cfg or ini file, or even better to a database
    The first suggestion already exists.
    If messages are turned on, the plugin notifies all the rounds will happen when the exchange of teams, according to the type set.
    And before making the return teams, he plays a sound and sends the warning that teams will be exchanged at the end of the round.
    At the end of the round, after making the switch, it also emits another sound and a new warning that the teams were switched.

    The second suggestion I did not understand well ... You want to create a list of users that will be immune, just as admins?
    __________________
    My Plugins:
    -IP Block: This plugin block the entry in the server of players with same IP. Too is possible to config exceptions for some IPs
    -Auto Swap Team: This plugin does the automatic swap of teams according to the options selected
    -Welcome Sound: Plays sound of welcome for the players
    Experto is offline
    DoPe^
    Veteran Member
    Join Date: Jul 2008
    Location: Denmark / Copenhagen
    Old 01-26-2011 , 19:24   Re: Auto Swap Team
    Reply With Quote #8

    Quote:
    Originally Posted by Experto View Post
    The first suggestion already exists.
    If messages are turned on, the plugin notifies all the rounds will happen when the exchange of teams, according to the type set.
    And before making the return teams, he plays a sound and sends the warning that teams will be exchanged at the end of the round.
    At the end of the round, after making the switch, it also emits another sound and a new warning that the teams were switched.
    hmm, where do i add the sound that should play before the teams are switched?



    Quote:
    Originally Posted by Experto View Post
    .
    The second suggestion I did not understand well ... You want to create a list of users that will be immune, just as admins?
    ya, and it would be awesome if it could be done by a cvar, like sm_autoswapteam_immune_add <SteamID>
    and
    sm_autoswapteam_immune_remove <SteamID>

    it's more because, as i said in the previous post, we are running sourcebans, which means admins and stuff runs over our website, so we would have to add players manually to that which is a pain in the ass when we have a script that can do it automatically if there is cvars for it.

    Last edited by DoPe^; 01-26-2011 at 19:31.
    DoPe^ is offline
    Experto
    Member
    Join Date: Jan 2008
    Location: Brasil
    Old 01-27-2011 , 09:57   Re: Auto Swap Team
    Reply With Quote #9

    Quote:
    hmm, where do i add the sound that should play before the teams are switched?
    By default the plugin uses the sound "ambient/misc/brass_bell_C.wav", which is inside the folder "sounds" of the server.

    To use another alert sound you just change the value of the CVAR "sm_autoswapteam_sound_file" in the settings file "autoswapteam.cfg" that was created inside the folder "cfg/SourceMod".

    The sound file that you use should be inside the folder "sounds" of the server. If it is not any sound pattern of the game, you must add it in the file "whitelist.cfg" in the server.

    Example:
    "add" "sound/ui/..." // vgui ui sounds

    "add" "sound/quake/..." // folder with the sounds of the quake


    Quote:
    ya, and it would be awesome if it could be done by a cvar, like sm_autoswapteam_immune_add <SteamID>
    and
    sm_autoswapteam_immune_remove <SteamID>

    it's more because, as i said in the previous post, we are running sourcebans, which means admins and stuff runs over our website, so we would have to add players manually to that which is a pain in the ass when we have a script that can do it automatically if there is cvars for it
    Will I see the possibility of creating a list of players to add immunity
    __________________
    My Plugins:
    -IP Block: This plugin block the entry in the server of players with same IP. Too is possible to config exceptions for some IPs
    -Auto Swap Team: This plugin does the automatic swap of teams according to the options selected
    -Welcome Sound: Plays sound of welcome for the players
    Experto is offline
    Experto
    Member
    Join Date: Jan 2008
    Location: Brasil
    Old 02-02-2011 , 08:32   Re: Auto Swap Team
    Reply With Quote #10

    Dope, released version 2.0.0 with the option you suggested!
    __________________
    My Plugins:
    -IP Block: This plugin block the entry in the server of players with same IP. Too is possible to config exceptions for some IPs
    -Auto Swap Team: This plugin does the automatic swap of teams according to the options selected
    -Welcome Sound: Plays sound of welcome for the players
    Experto is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 13:24.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode