Creating an array

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

CyberAlon

Member
Oct 27, 2020
2
0
1
50
Hello.
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:
command /rank [<player>] [<text>]:
    aliases: /promote, /demote
    permission: rank.admin
    permission message: You aren't allowed to execute this command.
    trigger:
        if arg 1 is not set:
            send "&cPlease choose a player to rank" to player
            stop
        if arg 2 is not set:
            send "&cPlease choose a rank" to player
            stop
        execute command "/lp user %arg-1% parent set %arg-2%"
        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.
 
Last edited:
Status
Not open for further replies.