Solved Trouble with detecting lp permissions. [SOLVED]

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

JustBellow

Member
Mar 10, 2025
12
1
3
So I'm trying to make a skript where it executes a command if result is true, but I'm having trouble gettings it working.

Code:
command /test3:
    trigger:
        execute console command "/lp user %player% permission check permission.noobsp"
        if {_result} is true:
            execute console command "/lp user %player% parent set pro"
 
Hey, it looks alright, but i need to see, where you setting the variable {_result} to true, because from this right here i cant tell where is the mistake.
 
  • Like
Reactions: JustBellow
Hey, it looks alright, but i need to see, where you setting the variable {_result} to true, because from this right here i cant tell where is the mistake.
Oh! I thought it would just take the result from the test, could I get an example of something that would work for the code?
 
Hey, well from what i can see from your code, you want to check if player has permission, if yes -> set him some kind of rank i guess.
If thats the case you can do it like this:
Code:
command /test3:
    trigger:
        if player has permission"noobsp": #Check if player has permission "noobsp"
            execute console command "/lp user %player% parent set pro"
        else:
            send "&cYou do not have permission for this!" to player #Sends player chat message if they dont have a "noobsp" permission
I hope I understood what you want to do. (If the permission you are checking for is not "noobsp", just change it to whatever you need.)
Hope it helps :emoji_slight_smile:
 
  • Like
Reactions: JustBellow
Hey, well from what i can see from your code, you want to check if player has permission, if yes -> set him some kind of rank i guess.
If thats the case you can do it like this:
Code:
command /test3:
    trigger:
        if player has permission"noobsp": #Check if player has permission "noobsp"
            execute console command "/lp user %player% parent set pro"
        else:
            send "&cYou do not have permission for this!" to player #Sends player chat message if they dont have a "noobsp" permission
I hope I understood what you want to do. (If the permission you are checking for is not "noobsp", just change it to whatever you need.)
Hope it helps :emoji_slight_smile:
I got these two errors while trying the code, got any ideas why?
 

Attachments

  • Screenshot 2025-03-11 142222.png
    Screenshot 2025-03-11 142222.png
    29.8 KB · Views: 34
Oh, the space just slipped between the permission"noobsp": so just add the space between so like this permission "noobsp":
Sorry for that :emoji_frowning:
 
  • Like
Reactions: JustBellow