Raised This Month: $32 Target: $400
 8% 

[TF2] Instantly Change Team (v1.2 - 06Mar2023)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
PC Gamer
Veteran Member
Join Date: Mar 2014
Plugin ID:
7429
Plugin Version:
1.2
Plugin Category:
Admin Commands
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Administrators can change the target player's team instantly without respawn
    Old 12-22-2020 , 22:26   [TF2] Instantly Change Team (v1.2 - 06Mar2023)
    Reply With Quote #1

    Description:
    This plugin allows Administrators to instantly change the team of the target player without the player respawning to the Red, Blue, or Gray team. If placed on the Gray team the player will be able to attack and be attacked by the Red and Blue team. An Administrator can also move a player to the spectator team, move them from the spectator team, or move ALL players from the spectator team to a random class on the team with the fewest players.

    Admin Commands:
    Change to Red team: !ctred <target>
    Change to Blue team: !ctblue <target>
    Change to Gray team: !ctgray <target> or !ctgrey <target>
    Change to Spectator : !ctspec
    Note: If no target is provided then the command will apply to YOU.
    Remove ALL Spectating players: !nospec or !noafk (note: This will place the spectator on the team with the fewest players in a randomly chosen class)

    Examples:
    Change YOU to the Red team: !ctred
    Change player named Mark to the blue team: !ctblue mark
    Change target to Red team: !ctred <target>
    Change yourself to Blue team: !ctblue
    Change yourself to Gray team: !ctgray or !ctgrey

    Change yourself to Spectator : !ctspec
    Remove ALL Spectating players: !nospec or !noafk (note: This will place the spectator on the team with the fewest players as a randomly chosen class)

    Video of Instantly Change Team Plugin:


    Credits:
    The overwhelming majority of this code was developed by the extremely talented Benoist3012. I just put it in plugin form with commands.

    Installation:
    Put changeteam.txt into the folder: /sourcemod/gamedata/
    Put changeteam.smx into the folder: /sourcemod/plugins/
    Change map

    Changelog:
    06Mar2023: v1.2 - Renamed plugin name and gamedata file
    01Mar2023: v1.1 - Added crash prevention, grey team members who die now spawn in former team
    02Dec2022: Updated Gamedata file
    Attached Files
    File Type: sp Get Plugin or Get Source (changeteam.sp - 328 views - 8.8 KB)
    File Type: txt changeteam.txt (339 Bytes, 185 views)

    Last edited by PC Gamer; 03-06-2023 at 20:10.
    PC Gamer is offline
    Snowy Snowtime
    New Member
    Join Date: Aug 2021
    Old 06-15-2022 , 19:26   Re: [TF2] Instantly Change Team
    Reply With Quote #2

    Not too sure if you are still maintaining this, but changing your team to the "grey" team causes a ton of issues for players, causing them to crash after a certain while. I am not 100% sure as to why, but it could be related to the player count not updating in the HUD.
    I already updated the gamedata to match the current version, so I'm kinda just confused on if I should just restrict the grey command overall.

    In specific, being swapped to grey in general starts to cause the issue, even if you were reverted back to red/blu. The crash seems to occur when a player dies, change team regularly, or if they disconnect.

    Last edited by Snowy Snowtime; 06-15-2022 at 19:29. Reason: Add ways to reproduce the issue, and more thorough explanation.
    Snowy Snowtime is offline
    PC Gamer
    Veteran Member
    Join Date: Mar 2014
    Old 12-03-2022 , 00:55   Re: [TF2] Instantly Change Team
    Reply With Quote #3

    Updated gamedata in original post.
    PC Gamer is offline
    PC Gamer
    Veteran Member
    Join Date: Mar 2014
    Old 03-01-2023 , 03:03   Re: [TF2] Instantly Change Team (v1.1 - 01Mar2023)
    Reply With Quote #4

    Plugin in original post now updated to version 1.1

    This version hopefully fixed a rare bug where players would crash if someone was on the grey team when they died. Thanks goes to MADMADTV for the fix. This version also remembers what team you were on before joining the grey team. Once you die you'll be placed on your former team (RED or BLU) instead of spectator. Lastly, this version was updated to be SourceMod 1.11 compliant and will compile without errors or warnings.

    Have a great day!
    PC Gamer is offline
    Ronas963
    Member
    Join Date: Jun 2016
    Location: Denmark
    Old 03-06-2023 , 19:06   Re: [TF2] Instantly Change Team (v1.1 - 01Mar2023)
    Reply With Quote #5

    I make it correctly installed but I just don't know how to fix it?

    changeteam.smx (Change Team): Error detected in plugin startup (see error logs)
    Ronas963 is offline
    PC Gamer
    Veteran Member
    Join Date: Mar 2014
    Old 03-06-2023 , 20:13   Re: [TF2] Instantly Change Team (v1.2 - 06Mar2023)
    Reply With Quote #6

    Plugin in original post updated to version 1.2. This version simply changes the gamedata filename from ichangeteam.txt to changeteam.txt which is required.

    Thanks goes to Ronas963 for identifying the problem.
    PC Gamer is offline
    Ronas963
    Member
    Join Date: Jun 2016
    Location: Denmark
    Old 03-07-2023 , 06:24   Re: [TF2] Instantly Change Team (v1.2 - 06Mar2023)
    Reply With Quote #7

    PC Gamer it working done just change to changeteam.txt well done.
    Ronas963 is offline
    Reply



    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 14:31.


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