Auto-Switch Team

Discussion in 'Plugin Development' started by Acer_Mortem, Jan 19, 2013.

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

    Acer_Mortem

    Okay, I'm currently making a team plugin, and I want to make it so that when you join the server, it auto puts you into a team. How can I make it so that when player1 joins, they will be blue, then the second player joins and will be red, then a third joins and will be blue, etc.
     
  2. Offline

    adam753

    You mean change the colour of their players' skin texture? I don't think that's possible, the player gets to decide what they look like. I suppose if you want to colour-code people you could force them to wear dyed leather, but that would prevent the use of actual armour.
     
  3. Offline

    Craftiii4

    Hmm? I think he means so it knows which team to put the player in.

    If you do mean this then you need to get the amount of people in team blue and the amount of people in team red.
    If the players in team blue is less than or equal to team red, add to team blue. Else (red is less) then add to red.

    The reason for the equal to is to prevent it failing if the teams have the same amount of players.

    Setting the players head to the dyed wool colour could be a better alternative ^^

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
    Acer_Mortem likes this.
Thread Status:
Not open for further replies.

Share This Page