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

  • 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.
Aug 19, 2017
10
0
0
34
Hi there,
I am making a script group system and I am currently using variables to hold what rank a player is and I don't know how to add permissions.

code_language.skript:
command /rank [<offline player>] [<text>]:
    trigger:
        if command sender is player:
            if command sender is not console:
                if arg-2 is set:
                    if arg-1 is online:
                        if arg-2 is "member":
                            delete {rank::%player's uuid%}
                            send "&2&lMCM &8» &b%arg-1%'s &arank was set to &bMember&a!"
                        if arg-2 is "vip":
                            set {rank::%player's uuid%} to "vip"
                            send "&2&lMCM &8» &b%arg-1%'s &arank was set to &bVIP&a!"
                        if arg-2 is "vip+":
                            set {rank::%player's uuid%} to "vip+"
                            send "&2&lMCM &8» &b%arg-1%'s &arank was set to &bVIP+&a!"
                        if arg-2 is "mvp":
                            set {rank::%player's uuid%} to "mvp"
                            send "&2&lMCM &8» &b%arg-1%'s &arank was set to &bMVP&a!"
                        if arg-2 is "legend":
                            set {rank::%player's uuid%} to "legend"
                            send "&2&lMCM &8» &b%arg-1%'s &arank was set to &bLegend&a!"
                        if arg-2 is "helper":
                            set {rank::%player's uuid%} to "helper"
                            send "&2&lMCM &8» &b%arg-1%'s &arank was set to &bHelper&a!"
                        if arg-2 is "moderator" or "mod":
                            set {rank::%player's uuid%} to "moderator"
                            send "&2&lMCM &8» &b%arg-1%'s &arank was set to &bModerator&a!"
                        if arg-2 is "admin":
                            set {rank::%player's uuid%} to "admin"
                            send "&2&lMCM &8» &b%arg-1%'s &arank was set to &bAdmin&a!"
                        if arg-2 is "dev" or "developer":
                            set {rank::%player's uuid%} to "developer"
                            send "&2&lMCM &8» &b%arg-1%'s &arank was set to &bDeveloper&a!"
                        if arg-2 is "owner":
                            set {rank::%player's uuid%} to "owner"
                            send "&2&lMCM &8» &b%arg-1%'s &arank was set to &bOwner&a!"
                        if arg-2 is not "member" or "vip" or "vip+" or "mvp" or "legend" or "helper" or "moderator" or "mod" or "admin" or "developer" or "dev" or "owner":
                            send "&2&lMCM &8» &cThat rank does not exist!"
                    else:
                        send "{@prefix} &b%arg-1% &cdoes not exist or is offline!"
                else:
                    send "{@prefix} &aUsage: /rank (player) (rank)"
            else:
                send "{@prefix} &cYou must be &6&lADMIN &cto use this!"
        else:
            send "console"

That is my code and what I am wanting to do is set permissions for the groups/variables. Say I want to set essentials.fly for vip. Thank you
 
You should really use a rank system instead of continuing like this. This is just going to get worse and worse and longer and longer until its even harder to work with than it already is.
 
Status
Not open for further replies.