AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Instantly Change Team (v1.2 - 06Mar2023) (https://forums.alliedmods.net/showthread.php?t=329416)

PC Gamer 12-22-2020 22:26

[TF2] Instantly Change Team (v1.2 - 06Mar2023)
 
2 Attachment(s)
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

Snowy Snowtime 06-15-2022 19:26

Re: [TF2] Instantly Change Team
 
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.

PC Gamer 12-03-2022 00:55

Re: [TF2] Instantly Change Team
 
Updated gamedata in original post.

PC Gamer 03-01-2023 03:03

Re: [TF2] Instantly Change Team (v1.1 - 01Mar2023)
 
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!

Ronas963 03-06-2023 19:06

Re: [TF2] Instantly Change Team (v1.1 - 01Mar2023)
 
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)

PC Gamer 03-06-2023 20:13

Re: [TF2] Instantly Change Team (v1.2 - 06Mar2023)
 
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.

Ronas963 03-07-2023 06:24

Re: [TF2] Instantly Change Team (v1.2 - 06Mar2023)
 
PC Gamer it working done just change to changeteam.txt well done.


All times are GMT -4. The time now is 16:50.

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