Raised This Month: $44 Target: $400

[TF2] Instantly Change Team

Post New Thread Reply   
Thread Tools Display Modes
PC Gamer
Veteran Member
Join Date: Mar 2014
Plugin ID:
Plugin Version:
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 , 23:26   [TF2] Instantly Change Team
    Reply With Quote #1

    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)

    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:

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

    Put ichangeteam.txt into the folder: /sourcemod/gamedata/
    Put ichangeteam.smx into the folder: /sourcemod/plugins/
    Change map
    Attached Files
    File Type: txt ichangeteam.txt (339 Bytes, 232 views)
    File Type: sp Get Plugin or Get Source (ichangeteam.sp - 473 views - 8.5 KB)

    Last edited by PC Gamer; 09-15-2022 at 04:45.
    PC Gamer is offline
    Snowy Snowtime
    New Member
    Join Date: Aug 2021
    Old 06-15-2022 , 20: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 20:29. Reason: Add ways to reproduce the issue, and more thorough explanation.
    Snowy Snowtime is offline

    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 21:10.

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