1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Promote / Remove the old Permission/Rank and get the new rank

Discussion in 'Skript' started by Dhavex, Feb 1, 2019.

Thread Status:
Not open for further replies.
  1. Dhavex

    Dhavex Member

    Joined:
    Feb 1, 2019
    Messages:
    1
    Likes Received:
    0
    Hello everyone! I am new to the script and have also scripted something. I've done a Rank system and somehow wanted a "/ promote <offlineplayer> & / demote <offline player>" and I did too, but I do not understand a thing: how can I promote someone if he has the rank for example Staff and I want to promote him to admin and the other rank should be removed automatically.


    Code (Text):
    1. options:
    2.     #PREFIX
    3.     r: &7&l[&c&lRANG&7&l]
    4.     #PROMOTES
    5.     promote1: pex user %arg-1% group add Azubi
    6.     promote2: pex user %arg-1% group add Supporter
    7.     promote3: pex user %arg-1% group add Moderator
    8.     promote4: pex user %arg-1% group add SrModerator
    9.     promote5: pex user %arg-1% group add Admin
    10.     #DEMOTES
    11.     demote6: pex user %arg 1% group remove Admin
    12.     demote5: pex user %arg 1% group remove SrModerator
    13.     demote4: pex user %arg 1% group remove Moderator
    14.     demote3: pex user %arg 1% group remove Supporter
    15.     demote2: pex user %arg 1% group remove Azubi
    16.     demote1: pex user %arg 1% group remove Spieler
    17.     #REMOVE
    18.     remove1: pex user %arg 1% group remove Spieler
    19.     remove2: pex user %arg 1% group remove Azubi
    20.     remove3: pex user %arg 1% group remove Supporter
    21.     remove4: pex user %arg 1% group remove Moderator
    22.     remove5: pex user %arg 1% group remove SrModerator
    23.     remove6: pex user %arg 1% group remove Admin
    24.  
    25.  
    26. command /promote <offlineplayer>:
    27.     permission: rang.sk
    28.     usage: {@r} &7Nutze: &e/promote &7<Name>
    29.     executable by: player, console
    30.     trigger:
    31.         if arg 1 is not set:
    32.             send "{@r} &7Nutze: &e/promote &7<Name>"
    33.         if arg 1 is set:
    34.             execute console command "{@promote1}"
    35.             execute console command "{@remove1}"
    36.             send "{@r} &7Du hast &a%arg 1% &7erfolgreich den Rang &aAzubi &7gegeben!"
    37.             stop
    38.         if player has permission "Azubi":
    39.             execute console command "{@promote2}"
    40.             execute console command "{@remove2}"
    41.             send "{@r} &7Du hast &a%arg 1% &7erfolgreich den Rang &aSupporter &7gegeben!"
    42.             stop
    43.  
     
  2. matvapes

    matvapes Member

    Joined:
    May 15, 2018
    Messages:
    11
    Likes Received:
    0
    Just make two commands executing whenever you type the promote command. For example:
    Code (Text):
    1. command /promote <player>:
    2.     trigger:
    3.         make console execute command "/pex user %arg-1% group set blabla"
    4.         make console execute command "/pex user %arg-1% group remove blabla"
     
Thread Status:
Not open for further replies.
Loading...