Solved Permissions per tag {Simple help}, i think

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

Gino

Member
Apr 10, 2017
24
4
0
25
Hey this is my skript:

command /tag [<text>]:
aliases: /tags, /t, /tgs, /ts
permission: tag.use
permission message: &cNo permissions.
trigger:
if arg 1 is not set:
open chest with 3 rows named "&7Tags" to player
format slot 0 of player with black stained glass named "&0." to be unstealable
format slot 1 of player with black stained glass named "&0." to be unstealable
format slot 2 of player with black stained glass named "&0." to be unstealable
format slot 3 of player with black stained glass named "&0." to be unstealable
format slot 4 of player with black stained glass named "&0." to be unstealable
format slot 5 of player with black stained glass named "&0." to be unstealable
format slot 6 of player with black stained glass named "&0." to be unstealable
format slot 7 of player with black stained glass named "&0." to be unstealable
format slot 8 of player with black stained glass named "&0." to be unstealable
format slot 9 of player with black stained glass named "&0." to be unstealable
format slot 10 of player with book named "&8[&4Escaper1&8] &7Tag" to close then run [execute console command "manuaddv %player% suffix &8[&4Escaper1&8] "]
format slot 11 of player with book named "&8[&4Escaper1&8] &7Tag" to close then run [execute console command "manuaddv %player% suffix &8[&4Escaper1&8] "]
format slot 12 of player with book named "&8[&4Escaper1&8] &7Tag" to close then run [execute console command "manuaddv %player% suffix &8[&4Escaper1&8] "]
format slot 13 of player with book named "&8[&4Escaper1&8] &7Tag" to close then run [execute console command "manuaddv %player% suffix &8[&4Escaper1&8] "]
format slot 14 of player with book named "&8[&4Escaper1&8] &7Tag" to close then run [execute console command "manuaddv %player% suffix &8[&4Escaper1&8] "]
format slot 15 of player with book named "&8[&4Escaper1&8] &7Tag" to close then run [execute console command "manuaddv %player% suffix &8[&4Escaper1&8] "]
format slot 16 of player with book named "&8[&4Escaper1&8] &7Tag" to close then run [execute console command "manuaddv %player% suffix &8[&4Escaper1&8] "]
format slot 17 of player with black stained glass named "&0." to be unstealable
format slot 18 of player with black stained glass named "&0." to be unstealable
format slot 19 of player with book named "&8[&4Escaper1&8] &7Tag" to close then run [execute console command "manuaddv %player% suffix &8[&4Escaper1&8] "]
format slot 20 of player with book named "&8[&4Escaper1&8] &7Tag" to close then run [execute console command "manuaddv %player% suffix &8[&4Escaper1&8] "]
format slot 21 of player with book named "&8[&4Escaper1&8] &7Tag" to close then run [execute console command "manuaddv %player% suffix &8[&4Escaper1&8] "]
format slot 22 of player with book named "&8[&4Escaper1&8] &7Tag" to close then run [execute console command "manuaddv %player% suffix &8[&4Escaper1&8] "]
format slot 23 of player with book named "&8[&4Escaper1&8] &7Tag" to close then run [execute console command "manuaddv %player% suffix &8[&4Escaper1&8] "]
format slot 24 of player with book named "&8[&4Escaper1&8] &7Tag" to close then run [execute console command "manuaddv %player% suffix &8[&4Escaper1&8] "]
format slot 25 of player with book named "&8[&4Escaper1&8] &7Tag" to close then run [execute console command "manuaddv %player% suffix &8[&4Escaper1&8] "]
format slot 26 of player with barrier named "&c&lComing soon..." to be unstealable
format slot 27 of player with black stained glass named "&0." to be unstealable

I want to add Permissions for every tag, but i have no idea how. Maybe if i create a command for every tag, but there must be a better way?
Spigot: 1.13.2
 
I do not know how skript works in versions higher than 1.8.8, but you could do something like this:

code_language.skript:
command /tag [<text>]:
    permission: tag.use
    permission message: §4No permission
    trigger:
        argument 1 is not set:
            open chest with 3 rows named "&7Tags" to player
            set {_n} to 0
            loop 10 times:
                format a gui slot {_n} of player with black stained glass named "&8" to do nothing
                add 1 to {_n}
            format a gui slot 10 of player with book named "&8[&4Escaper1&8]&7 Tag" to close:
                if player has permission "tag.use.escaper1":
                    execute console command "manuaddv %player% suffix &8[&4Escaper1&8]"
                else:
                    message "§4No permission"
And so with all the tags you want.
 
I do not know how skript works in versions higher than 1.8.8, but you could do something like this:

code_language.skript:
command /tag [<text>]:
    permission: tag.use
    permission message: §4No permission
    trigger:
        argument 1 is not set:
            open chest with 3 rows named "&7Tags" to player
            set {_n} to 0
            loop 10 times:
                format a gui slot {_n} of player with black stained glass named "&8" to do nothing
                add 1 to {_n}
            format a gui slot 10 of player with book named "&8[&4Escaper1&8]&7 Tag" to close:
                if player has permission "tag.use.escaper1":
                    execute console command "manuaddv %player% suffix &8[&4Escaper1&8]"
                else:
                    message "§4No permission"
And so with all the tags you want.
Thanks works!
 
  • Like
Reactions: couger44
Status
Not open for further replies.