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

Admin Items Skript (Need Help)

Discussion in 'Skript' started by Nils Bertling, Feb 18, 2021.

Tags:
Thread Status:
Not open for further replies.
  1. Nils Bertling

    Nils Bertling Member

    Joined:
    Feb 18, 2021
    Messages:
    1
    Likes Received:
    0
    Hey, I made a Admin Items Skript, so that normal players can see them but only Admins can edit them.
    The Skript worked in 1.12.2 but the saving mechanism wont work in 1.16.4. Can somebody help me with that?

    [EDIT] Also there is no error message if i reload the Skript [EDIT]

    Code (Text):
    1. command /adminitems [<text>]:
    2.     aliases: ai
    3.     trigger:
    4.         if arg-1 is "admin":
    5.             if player has permission "cb.admin":
    6.                 open virtual chest inventory named "&c&lAdmin-Items" with size 6 to player
    7.                 set {_slot} to 0
    8.                 loop 54 times:
    9.                     set slot {_slot} of current inventory of player to {chest::%{_slot}%::Notch}
    10.                     add 1 to {_slot}
    11.             else:
    12.                 send "&c&lSystem &r&8»&c No Permissions" to player
    13.  
    14.         if arg-1 is not set:
    15.             open virtual chest inventory named "&c&lAdmin-Items list" with size 6 to player
    16.             set {_slot} to 0
    17.             loop 54 times:
    18.                 set slot {_slot} of current inventory of player to {chest::%{_slot}%::Notch}
    19.                 add 1 to {_slot}
    20.  
    21. on inventory click:
    22.     if name of event-inventory is "&c&lAdmin-Items list":
    23.         if index of event-slot > -1:
    24.             cancel event
    25.  
    26. on inventory close:
    27.     if inventory name of current inventory of player is "&c&lAdmin-Items":
    28.         set {_slot} to 0
    29.         loop 54 times:
    30.             set {chest::%{_slot}%::Notch} to slot {_slot} of current inventory of player
    31.             add 1 to {_slot}
    32.         send "&c&lSystem &r&8» &c Saved Admin-Items" to player
     
    #1 Nils Bertling, Feb 18, 2021
    Last edited: Apr 15, 2021
Thread Status:
Not open for further replies.

Share This Page

Loading...