check if player has permission

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

NickyMouse

Member
Aug 12, 2021
3
0
1
Hey i kind of tried to skript but it ddn't work out, check if player has permission isn't working..

Can someone fix please?

Code:
command /GiftRankMVPPPToUserSpecialCommand [<offline player>] [<text>]:
    permission: giftrank.mvppp
    permission message: &cYou Don't have permission!
    trigger:
        if player has permission "rank.mvp":
        cancel event
        send "&cThis player already has this Rank!"
        else:
        if arg-2 is not set:
            send "&cUse:"
            send "&c/giftrank (player) (rank)"
        if arg-2 is set:
            execute console command "pex user %arg-1% group set MVP++"
            play sound "entity_firework_blast" to player with volume 1 and pitch 2
            broadcast "&e&ke&c&ke&4&ke&r %player's displayname% &egifted the &6MVP&c++ &erank to &6%arg 1%&e. &4&ke&c&ke&e&ke&r"
            broadcast "&eThey have gifted &60 &erank so far!"
 
Code:
command /giftrank [<offline player>]:
    permission: giftrank.mvppp
    permission message: &cYou Don't have permission!
    trigger:
        if arg-1 is set:
            if arg-1 has permission "rank.mvp":
                send "&cThis player already has the MVP++ rank!"
                stop
            execute console command "pex user %arg-1% group set MVP++"
            play sound "entity_firework_blast" to player with volume 1 and pitch 2
            broadcast "&e&ke&c&ke&4&ke&r %player's displayname% &egifted the &6MVP&c++ &erank to &6%arg 1%&e. &4&ke&c&ke&e&ke&r"
            broadcast "&eThey have gifted &60 &erank so far!"
        else:
            send "&c/giftrank (player)"
 
Status
Not open for further replies.