Minecraft Team System

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Logy

Member
Jun 16, 2024
3
0
1
24
Hey there!

I am making an event and I need help setting up a simple command called /teamassign where you can assign players to a team, the command should look something like this: "/team assign <team> <player>" and then it broadcasts something like "(Player) has joined team (team name)".

The teams for it and their respective team names are here:
Red Robins - red
Amber Angelfish - amber
Yellow Yabbies - yellow
Lime Lizards - lime
Green Giraffes - green
Teal Tanagers - teal
Cyan Cichlids - cyan
Blue Birds - blue
Magenta Macaws - magenta
Pink Pigeons - pink

If possible I'd also like for them to be added to a variable where it goes up and down with each team member added.
If thats not possible, it would still be fine
 
Code:
command /team assign <text>
  trigger:
    if arg-1 is "red"
      set {player.%uuid of player%} to player
      add 1 to {numberred} #this variable is how many players have joined
      add {player.%uuid of player%} to {teamred}
      broadcast "%{player.%uuid of player%}% has just joined the Red Robbins!"