1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Balance Teams

Discussion in 'Skript' started by Leonardo_, Dec 12, 2020.

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

    Leonardo_ Member

    Joined:
    Sep 21, 2020
    Messages:
    18
    Likes Received:
    0
    Hi, I would need help to fix this command. I need him to be able to block entry into a team with more people than the others. I did this, but it doesn't work. (He doesn't tell me any errors)

    Code (Text):
    1. command /joinitaly:
    2.     permission: ww2.selectteam
    3.     trigger:
    4.         if {russia} or {usa} or {germania} are higher than {italia}:
    5.             set {italia_lista::*} to "%player%"
    6.             add 1 to {italia}
    7.             message "{@prefix} Ora sei in Italia!" to player
    8.         if {russia},{usa} and {germania} are equal to {italia}:
    9.             set {italia_lista::*} to "%player%"
    10.             add 1 to {italia}
    11.             message "{@prefix} Ora sei in Italia!" to player
    12.  
    13.  
    14.  
    15. command /resetall:
    16.     permission: ww2.debug.resetall
    17.     trigger:
    18.         delete {russia_lista::*}
    19.         delete {italia_lista::*}
    20.         delete {germania_lista::*}
    21.         delete {usa_lista::*}
    22.         delete {mercenario_lista::*}
    23.         set {italia} to 0
    24.         set {russia} to 0
    25.         set {usa} to 0
     
  2. BadName

    BadName Member

    Joined:
    Oct 23, 2020
    Messages:
    23
    Likes Received:
    0
    I tried your skript and all it said was you didn't make the options. you need to add the "prefix" option.



    Code (Text):
    1. options:
    2.     prefix: (whatever your prefix is)
    (this goes above the skript, or that's normal how people do it.)
     
  3. Leonardo_

    Leonardo_ Member

    Joined:
    Sep 21, 2020
    Messages:
    18
    Likes Received:
    0
    {@prefix} I had already set it, only I hadn't copied it to the script excerpt. The problem is that it doesn't recognize whether variables are equal to or higher than another
    --- Double Post Merged, Dec 13, 2020, Original Post Date: Dec 13, 2020 ---
    Help please
     
  4. BadName

    BadName Member

    Joined:
    Oct 23, 2020
    Messages:
    23
    Likes Received:
    0
    This doesnt let you choose a team, but it should make it as even as posible
    Code (Text):
    1.  
    2. command /jointeam:
    3.   trigger:
    4.     if {team1} or {team3} or {team4} is more than {team2}:
    5.       send "You joined the USA!" to player
    6.       add 1 to {team2}
    7.       add player to {team2.usa}
    8.     if {team2} or {team3} or {team4} is more than {team1}:
    9.       add player to {team1.italy}
    10.       add 1 to {team1}
    11.       send "You joined Italy!" to player
    12.     if {team2} or {team1} or {team4} is more than {team3}:
    13.       send "You joined Russia" to player
    14.       add player to {team3.russia}
    15.       add 1 to {team3}
    16.     if {team2} or {team1} or {team3} is more than {team4}:
    17.       send "You joined Germany!" to player
    18.       add player to {team4.germany}
    19.       add 1 to {team4}
    20.  
    21.  
    22. command /teamsreset:
    23.   permission: skript.resetteams
    24.   trigger:
    25.     clear {team4}
    26.     clear {team3}
    27.     clear {team2}
    28.     clear {team1}
    29.     clear {team4.germany}
    30.     clear {team3.russia}
    31.     clear {team2.usa}
    32.     clear {team2.italy}
    33.     send "All teams were cleared!" to player
     
Thread Status:
Not open for further replies.

Share This Page

Loading...