PHP Code:
AddCommandListener(Command_JoinGame, "joingame");
public Action Command_JoinGame(int client, const char[] command, int args)
{
SetEntPropFloat(client, Prop_Send, "m_fForceTeam", 0.0);
SetEntProp(client, Prop_Send, "m_iPendingTeamNum", CS_TEAM_CT);
}
Another way to assign a team on connect. Tested only on local server.