Solved Pex groups

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

JustADev

Well-Known Member
Apr 8, 2017
379
9
18
22
I'm wondering how to check if some argument is some group using PermissionsEX plugin.
I tried : if arg 1 group is "Member": and also if group of arg 1 is "Member:
With the first I'm getting Can't compare... error and with the second Can't understand this condition.
So, where is my fault?

Code:
code_language.skript:
on chat:
    if player has permission "message.owner":
        if {Class::%player%} is set:
            cancel event
            broadcast "&8[&7Lvl %{Level::%player%}%&8] &8[&7%{Class::%player%}%&8] [&6Owner&8] &7%player% &8» &f%message%"
            stop
        else:
            cancel event
            broadcast "&8[&7Lvl %{Level::%player%}%&8] [&6Owner&8] &7%player% &8» &f%message%"
            stop

what if I want to do it with a group like "Owner"?
 
Last edited:
You can only check if a player has a permission. Doesn't work with groups.

Add a custom permission, for example, 'admin', to a group. Then you can use player has permission "admin" to check if a player is in the group admin.
 
No errors madame.
[doublepost=1503194115,1503193936][/doublepost]except I want it so when a player is added into a certain group, it adds the perm to the group
 
No errors madame.
[doublepost=1503194115,1503193936][/doublepost]except I want it so when a player is added into a certain group, it adds the perm to the group
Use the on command event for what you want to do. Split the arguments at " " and then execute the command to add the last arg as a perm. It'll be something like this
code_language.skript:
    set {_full_command} to full command
    set {_command_args::*} to {_full_command} split at " "
With pex your perm is the 5th argument so with that command you'd add %{_command_args::5}%
 
Status
Not open for further replies.