Hello, How would I go about sorting all the players on a server in to two uneven groups/teams. For example, there are 10 people on the server. I want 40% to be on red and 60% to be on blue. What would be the best way to do this? "Best" being least lag, and fastest. Also including code examples would be great. Thanks!
First get your percentages for both, 40% red lets say... Loop through the players in the game, and the first 4 of the 10 and add them to the players in the red group? For the 60% just loop through and add the other 6 to it?
nxtguy So get the player randomly using Java's Random class, put them into an array, and then loop through that array?
Awesome, thanks! skipperguy12 Would you also happen to know how to set the server motd? EDIT by Moderator: merged posts, please use the edit button instead of double posting.