AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   automatic assignment of the teams (https://forums.alliedmods.net/showthread.php?t=184657)

alvedro 05-07-2012 11:26

automatic assignment of the teams
 
Hey, let's say for example I have 10 players on SPECT. How are randomly assigned them to teams? So, to maintain a balance between the amount of ct = t, unless we are not pairwise.

Exolent[jNr] 05-07-2012 11:33

Re: automatic assignment of the teams
 
1. Get all players.
2. Randomize the array of players.
3. Loop through first half and assign to T.
4. Loop through second half and assign to CT.


All times are GMT -4. The time now is 00:30.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.