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!


    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.

Creating an array

Discussion in 'Skript' started by CyberAlon, Oct 27, 2020.

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

    CyberAlon Member

    Oct 27, 2020
    Likes Received:
    I have a server with the luckperms plugin and I want to create an array there with all the ranks, called {ranks}.
    I wanted to create a command to rank people really fast, with /rank [<player>] [<text>] (the text arg is the rank).
    My first attempt went well:
    Code (Text):
    1. command /rank [<player>] [<text>]:
    2.     aliases: /promote, /demote
    3.     permission: rank.admin
    4.     permission message: You aren't allowed to execute this command.
    5.     trigger:
    6.         if arg 1 is not set:
    7.             send "&cPlease choose a player to rank" to player
    8.             stop
    9.         if arg 2 is not set:
    10.             send "&cPlease choose a rank" to player
    11.             stop
    12.         execute command "/lp user %arg-1% parent set %arg-2%"
    13.         stop
    Now I want to create a system that can say whether or not the rank exists.
    I need to create an array with all the ranks, and then to check if arg-2 is inside the array so I can send the player that the rank does not exist.

    Any help would be appreciated so much.
    #1 CyberAlon, Oct 27, 2020
    Last edited: Oct 29, 2020
Thread Status:
Not open for further replies.

Share This Page