View Single Post
LenHard
Senior Member
Join Date: Jan 2016
Old 05-24-2018 , 21:29   Re: Plugin to re-enable "changeteam" command in TF2.
Reply With Quote #2

Quote:
Originally Posted by StrikerMan780 View Post
For some reason, Valve, in their infinite fucking stupidity, decided it would be a JUST ABSOLUTELY WONDERFUL FUCKING IDEA to disable team switching all the way around the board, without any option to re-enable them on community servers, also preventing spectators from even being able to join the match they're watching.

Any way that someone could make a plugin to re-enable the "changeteam" command?
PHP Code:
#include <sourcemod>

#pragma newdecls required
#pragma semicolon 1

public void OnPluginStart()
{
    
AddCommandListener(CL_JoinTeam"jointeam");
}

public 
Action CL_JoinTeam(int clientchar[] sCommandint args)  
{    
    if (
client <= MaxClients && IsClientInGame(client))
    {
        
char[] sJoining = new char[5];
        
GetCmdArg(1sJoining5);
        
        
int iTeam StringToInt(sJoining);
        
        if (
GetClientTeam(client) != iTeam)
            
ChangeClientTeam(clientiTeam);
        return 
Plugin_Handled;
    }
    return 
Plugin_Continue;

I'm not too familiar with TF2, but maybe this would work? Untested.
__________________

Last edited by LenHard; 05-24-2018 at 21:30.
LenHard is offline