Hello, I'm having problems with permissions on skript

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

number52091

Member
Feb 24, 2024
14
0
1
29
So, it seems very simple, but this is really complicating me, Where should I fit the command "player has permission"

command /test:
trigger:
set {_gui} to a new chest inventory with 3 row with name "teste"
if player's level is above 3:
set slot 0 of {_gui} to diamond named "goku"

open {_gui} to player

I've already tried placing it everywhere, but I always get an error.
 
You can literally just add a permission to the command

AppleScript:
command test:
    permission: test.use
    trigger:
        #do stuff
 
You can literally just add a permission to the command

AppleScript:
command test:
    permission: test.use
    trigger:
        #do stuff
man, That's not what I meant, And it's kind of obvious that I wouldn't forget to add, I just didn't specify it in the problem. I referred to the command as a whole,
and I already put the permission above trigger, and it didn't work the same way.
 
What do you even mean?
look, this is the permission> player has permission "op"
Everything I want to know and where to insert this permission in the skript to resolve the error, like,

command /teste:
trigger:
set {_gui} to a new chest inventory with 3 row with name "Omnitrix"
if player's level is above 3:
set slot 0 of {_gui} to diamond named "goku"

open {_gui} to player

above "trigger", below "trigger",
above "if player's level is above 3" Anyway, do you understand?
I've already put it everywhere, and it always gives an error in the skript
 
If you only want it to be usable by players with op, literally just do
Code:
command /teste:
    permission: op
    trigger:
        set {_gui} to a new chest inventory with 3 row with name "Omnitrix"
        if player's level is above 3:
            set slot 0 of {_gui} to diamond named "goku"
            open {_gui} to player
 
If you only want it to be usable by players with op, literally just do
Code:
command /teste:
    permission: op
    trigger:
        set {_gui} to a new chest inventory with 3 row with name "Omnitrix"
        if player's level is above 3:
            set slot 0 of {_gui} to diamond named "goku"
            open {_gui} to player
It worked, thanks man! I'm kinda new to this skript thing just ignore my stupidity XD