Solved Filling teams with players.

Discussion in 'Plugin Development' started by jebbo, Aug 21, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    jebbo

    So I'm kinda stuck with this..
    I want to fill 2 (in my example) teams with 3 players.
    How do I go on about this, I only say 3 players because 1 of them already chose team A.
    Does anybody have a quick tip how I can automaticly, evenly, place the remaining players into team A and B?

    I hope you get what I mean. :D
     
  2. Offline

    mine-care

    @jebbo
    if i understood correctly, Loop through the online players, and if the players in list A are more than in list b, add it to b, then if b>a add it to a and if its equal just chose a random one :p
     
    jebbo likes this.
  3. Offline

    jebbo

    Got it working, feeling stupid now ._.
     
  4. Offline

    mine-care

    @jebbo Great to hear that your problem was solved, Dont feel stupid! there are no stupid questions just stupid answers!
     
Thread Status:
Not open for further replies.

Share This Page