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

[ANY] SwapTeam Manager


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Teamkiller324
Senior Member
Join Date: Feb 2014
Location: Earth
Plugin ID:
7473
Plugin Version:
1.3.2
Plugin Category:
All
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Manage and swap players teams.
    Old 01-22-2021 , 02:35   [ANY] SwapTeam Manager
    Reply With Quote #1

    [ANY] SwapTeam Manager

    Description
    Manage teams, swap teams, exchange players teams, and force team on a target.
    This is a standalone version of SwapTeam module from my All-In-One plugin "Random Commands Plugin" (unreleased).
    Supporting translations, currently having swedish & english atm.

    Games Currently Supported
    1. Team Fortress 2
    2. Team Fortress 2 Classic
    3. Counter-Strike: Source
    4. Counter-Strike: Global Offensive
    5. Left 4 Dead
    6. Left 4 Dead 2
    7. Day of Defeat: Source
    8. More to be supported later by suggestion

    Commands
    1. sm_swap - Swap a player to opposite team
    2. sm_swapteam - Swap a player to opposite team
    3. sm_switch - Swap a player to opposite team
    4. sm_switchteam - Swap a player to opposite team
    5. sm_exchange - Exchange a target to a clients team
    6. sm_spec - Switch to spectators team
    7. sm_switchspec - Switch a player to the spectators team
    8. sm_swapteam - Switch a player to the spectators team
    9. sm_forceteam - Force a team index on a client
    10. sm_scramble - Scramble a player to a random team.
    11. sm_scrambleteams - Scramble players to a random team.

    ConVars
    1. sm_swapteam_notify_swapteam - Determine if teamswaps shall be notified to everyone or just the client. Default: 1
    2. sm_swapteam_notify_specteam - Determine if spectator teamswaps shall be notified to everyone or just the client. Default: 1
    3. sm_swapteam_notify_exchangeteam - Determine if exchange teamswaps shall be notified to everyone or just the client. Default: 1
    4. sm_swapteam_instant - Should team swaps be instant? (Teamchange without respawning) Default: 0
    5. sm_swapteam_updatemodel - [CSS/CSGO] Should the players model get updated once swapped team? Default: 1

    Dependencies
    1. Tk Libraries - Required to compile the plugin.
    2. Updater - Required to compile with and have updater support using the plugin.

    Plans
    1. Add team scramble command. Done
    2. Implement an administration menu.

    Changelog
    Quote:

    Version 1.3.2
    + Updated code.
    + Added Updater Support.
    + Added Danish translation. (Thanks to ksgoescoding).

    Version 1.3.0
    + Fixed "CS_UpdateClientModel native not found" error bug (It's loaded even tough it shouldn't be able to be loaded on non-cs games).
    + Fixed cvars not functioning correctly.
    + Fixed messages to properly function and be shown correctly.
    + Updated & cleaned up the code.
    + Updated translations.

    Version 1.2.0
    + Added Day of Defeat: Source Support.
    + Added Command sm_scramble - Scramble a player to random team.
    + Added Command sm_scrambleteams - Scramble players to a random team.
    + Fixed team swapping to work properly now.

    Version 1.1.0
    + Added Left 4 Dead & Left 4 Dead 2 Support.
    + Updated Translation File.
    + Added Swedish Translation.
    + Updated The Code.
    + Updated sm_swapteam_notify.
    + Added ConVar sm_swapteam_notify_swapteam - Determine if teamswaps shall be notified to everyone or just the client.
    + Added ConVar sm_swapteam_notify_specteam - Determine if spectator teamswaps shall be notified to everyone or just the client.
    + Added ConVar sm_swapteam_notify_exchangeteam - Determine if exchange teamswaps shall be notified to everyone or just the client.
    + Added ConVar sm_swapteam_notify_forceteam - Determine if forced teamswaps shall be notified to everyone or just the client.
    + Compiling Now Requires Tk Libraries.
    > Note: Be sure to delete your current plugin folder (/cfg/sourcemod/swapteam_manager.cfg) and restart the server or reload the plugin to configure the new convars.

    Version 1.0.0
    + Release

    GitHub Repository | Latest Release

    Translations are welcome
    __________________

    Last edited by Teamkiller324; 03-15-2024 at 16:02.
    Teamkiller324 is offline
    SkiPlix
    Member
    Join Date: Dec 2016
    Location: Argentina
    Old 01-29-2021 , 06:15   Re: [ANY] SwapTeam Manager [Updated 22-01-21] Version 1.0.0
    Reply With Quote #2

    L4D2 Support, please?

    Also here's the spanish translation since i don't know how to pull request/whatever and add the changes on Github...
    Attached Files
    File Type: txt swapteam_manager.phrases.txt (1.5 KB, 91 views)

    Last edited by SkiPlix; 01-29-2021 at 06:57.
    SkiPlix is offline
    ThatKidWhoGames
    Veteran Member
    Join Date: Jun 2013
    Location: IsValidClient()
    Old 01-29-2021 , 13:40   Re: [ANY] SwapTeam Manager [Updated 22-01-21] Version 1.0.0
    Reply With Quote #3

    I could be wrong about this, but I noticed you put this into the code:
    PHP Code:
    public Extension __ext_tf2 =    {
        
    name "TF2 Tools",        //This allows any game to load without "TF2 Tools Extension is required" error on plugin startup
        
    file "game.tf2.ext",    //since the other games doesn't use the tf2 natives and the extension is automatically loaded
        
    required 0            //when server is running team fortress 2
    };

    public 
    Extension __ext_cstrike =    {
        
    name "cstrike",
        
    file "games/game.cstrike.ext",
        
    required 0
    }; 
    I'm pretty sure you can just undefine the requirement of the extensions when you define the includes. Example:
    PHP Code:
    #undef REQUIRE_EXTENSIONS
    #include <tf2_stocks>
    #include <cstrike> 
    ThatKidWhoGames is offline
    DeUltima
    Junior Member
    Join Date: Nov 2008
    Old 02-23-2021 , 19:17   Re: [ANY] SwapTeam Manager [Updated 30-01-21] Version 1.1.0
    Reply With Quote #4

    I know it's an older game, but any chance you could add Day of Defeat Source support? I would love to give it a go on my server.
    DeUltima is offline
    Teamkiller324
    Senior Member
    Join Date: Feb 2014
    Location: Earth
    Old 02-23-2021 , 19:51   Re: [ANY] SwapTeam Manager [Updated 30-01-21] Version 1.1.0
    Reply With Quote #5

    Quote:
    Originally Posted by DeUltima View Post
    I know it's an older game, but any chance you could add Day of Defeat Source support? I would love to give it a go on my server.
    Added
    __________________
    Teamkiller324 is offline
    gamer_kanelita
    Senior Member
    Join Date: Jun 2019
    Location: Peru
    Old 02-24-2021 , 17:04   Re: [ANY] SwapTeam Manager [Updated 24-02-21] Version 1.2.0
    Reply With Quote #6

    Is there a way to get all those commands out in my admin menu? It is for L4D2
    gamer_kanelita is offline
    Tonblader
    Senior Member
    Join Date: Jul 2011
    Location: Peru
    Old 05-06-2022 , 13:34   Re: [ANY] SwapTeam Manager
    Reply With Quote #7

    Left 4 Dead 2

    Quote:
    L 05/06/2022 - 12:27:19: [SM] Exception reported: Invalid Handle 0 (error: 4)
    L 05/06/2022 - 12:27:19: [SM] Blaming: all\updater.smx
    L 05/06/2022 - 12:27:19: [SM] Call stack trace:
    L 05/06/2022 - 12:27:19: [SM] [0] ArrayList.Length.get
    L 05/06/2022 - 12:27:19: [SM] [1] Line 10, updater/plugins.sp::GetMaxPlugins
    L 05/06/2022 - 12:27:19: [SM] [2] Line 32, updater/plugins.sp:luginToIndex
    L 05/06/2022 - 12:27:19: [SM] [3] Line 51, updater/plugins.sp::Updater_AddPlugin
    L 05/06/2022 - 12:27:19: [SM] [4] Line 25, updater/api.sp::Native_AddPlugin
    L 05/06/2022 - 12:27:19: [SM] [6] Updater_AddPlugin
    L 05/06/2022 - 12:27:19: [SM] [7] Line 88, D:\GitHub\Teamkiller324\SwapTeam-Manager\addons\sourcemod\scripting\swapteam_m anager.sp::OnPluginStart
    L 05/06/2022 - 12:27:19: [SM] Unable to load plugin "all\swapteam_manager.smx": Error detected in plugin startup (see error logs)

    Last edited by Tonblader; 05-06-2022 at 13:49.
    Tonblader 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 02:20.


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