I have mp_teamlist with two teams. Using the code above, the models are all gordons but the team names are the same as listed by mp_teamlist. It splits up the teams by number, so they have an equal number of people on each team(adding bots). I can only kill the players of the opposing team.
Ok, some further testing makes it more confusing. When I switch teams, the scoreboard looks ok, but all my opponents have the green sprite over their heads like they are my teammates, and the scoreboard shows my team's name two times, instead of showing team1 and team2. Then I kill an opponent and the scoreboard is back to normal, and the green sprites that show allies are no longer present on my allies or opponents.
It's pretty confusing. Tomorrow I could spend some time testing this with you on my server if you're up to it.