This is a bit late, but that's mainly because I forgot about it and/or was working very hard on it.
Here's a little Lua script you should place in maps/globalscripts/ and use sv_globalluascript to run, which will disable joining a team that has 1 (can be changed) player count more than other teams. ( It takes into account the team the player was on before, so you can't join the other team to unbalance by 2 if playercounts are even. )
If a team has 0 players, the team is counted as not existing. ( For some reason, there is no GetPlayerLimit, only a SetPlayerLimit, meaning any global script that is based on player count only works fully for either 2, 3 or 4 teams. The only way of getting around this is classing 0 player teams as disabled. )
This means a team could be infinitely unbalanced so 20 players are on Red and none are on Blue, but only if no-one joins Blue.
Another thing to bear in mind is it doesn't shuffle / balance teams, it just blocks people from joining a team with higher player counts than the others, meaning if someone leaves the game it won't do anything, and it doesn't fix it if somehow a player joins the team without Lua knowing.
drive.google.com/file/d/0B6UpoRQG3AOzYmJCVUhHb2ZKY2c
Bear in mind that I don't fully know whether it will work or not, because I have no friends and so cannot test it out for myself.
( So, probably best to test with others before you stick it on your server. - Also, you'll need to put "USE_AUTOSWITCH = false" at the top of skill map lua's and stuff like it, or some people have to play double so others can play quad and conc. "ez quad, ez lyfe [100-200]" )
|