16.05.2016, 10:28
Use foreach and create custom iterators for the teams. Then use Iter_Random. This is by far the most reliable way. A do-while loop might also work but it is not as efficient and there's a chance it may hang the server if no players are found.