How to add a permission to a variable

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

    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.

LoneElf

Active Member
Apr 30, 2017
165
2
18
Hey guys! So, I am making my own permissions skript because I like doing the out-of-the-ordinary, for instance, downloading permissions ex or group manager. So, I have set the ranks up and the chat prefixes and stuff like that, but I need to know, how do I add a permission to a variable because each rank is obviously set into a variable, such as {rank.owner.%uuid of player%}. Here is my code, and thanks for all of the help in advance! Have an AMAZING summer!
https://hastebin.com/oxidihutiz.vbs

The 1st 7 lines are what is going wrong. For example, you will see if you read all of the code, that there is a command called /rank with the permission "rank.set". Now, I did /permission owner add rank.set, and it messaged me, "rank,set has been added to Group: owner", and when I do /rank, it messages me the permission message, saying that it is only available to admins.
[doublepost=1498504609,1498495702][/doublepost]This is a little frustrating - Is this even possible, or has anyone else done this before that could help me? Thanks guys

LoneElf
 
Ok sorry man - The link doesn't work for me either. One second - I'll post a new one - Thanks for letting me know
 
There are no errors, but the thing is, it won't add the permission to the group, in this case, which is {rank.owner}. I'll try changing it to {rank.owner::*} and see if it works, and I'll get back to you guys! Thanks so much for your guys' help!
[doublepost=1498509339,1498508484][/doublepost]Ok. So, I tested it out, like you recommended, @Donut , but still - Doesn't work :/ I have no clue what to do. Thanks for the help guys! I really appreciate it. Hopefully we can come up with a solution besides stopping and using permissions ex!

LoneElf
 
Well it has to be a list variable in order to add something to it... which you are doing in line 13

I took a look at the code again and what I think you are trying to do doesnt make sense and won't work at all. ill explain the best i can. As far as I know you cant really add/remove real permissions in skript (unless you execute pex/group manager commands). However, you can make fake perms that are variables that act like real permissions. ex)
if {has_some_permission.%player's uuid%} is true:
broadcast "player has some permission"

You don't check if they have a permission, you check if the variable that represents a permission is true.

Then you incorporate this stuff into groups
 
  • Like
Reactions: LoneElf
Dude... Thanks so much - You are such a damn genius, but that being said, I am probably going to stick with Permissions EX then, if that is the solution because then I can't add commands that are used in other plugins, like, for instance, essentials commands. Thanks a lot guys, even though it didn't work as I hoped it would :emoji_slight_smile: I mean, at least I learned something new! Thanks guys! :emoji_slight_smile:
 
Maybe take a look around here.

Take the code, or use it.

https://forums.skunity.com/resources/permissionsk.247/

Directly from that page: "The Permission will only working for Skript. Other Plugins example Essentials won't work with it!"

And LoneElf said:
Dude... Thanks so much - You are such a damn genius, but that being said, I am probably going to stick with Permissions EX then, if that is the solution because then I can't add commands that are used in other plugins, like, for instance, essentials commands. Thanks a lot guys, even though it didn't work as I hoped it would :emoji_slight_smile: I mean, at least I learned something new! Thanks guys! :emoji_slight_smile:
 
Thanks for your desire to help, ChisleLP, but yeah, it doesn't work for things like essentials, sadly. Thanks everyone! :emoji_slight_smile:
 
Status
Not open for further replies.