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!


    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.

i need help with gui

Discussion in 'Skript' started by Lukioz, Feb 9, 2018.

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

    Lukioz Member

    Feb 9, 2018
    Likes Received:
    hello it is possible to make a gui that would close only selected one of option (test1 or test2), but not when pressing ESC button for example

    Code (Skript):
    1. command /testtfdf <player>:
    2.     permission: pol.baud
    3.     trigger:
    4.         open chest with 1 row named "testt" to arg 1
    5.         wait 3 ticks
    6.         format slot 0 of arg 1 with lime wool named "&test1" to close then run [make console execute command "/ddsd %arg-1%"]
    7.         format slot 8 of arg 1 with red wool named "&ctest2" to close then run [make console execute command "/ffsd %arg-1%"]
  2. Hykz

    Hykz Member

    May 8, 2017
    Likes Received:
    Dont use format slot, instead use set slot and an on inventory click event

    heres an example of what u can do with it

    Code (Skript):
    1. command /test:
    2.     trigger:
    3.         open chest with 3 rows named "hello" to player
    4.         wait 1 ticks
    5.         set slot 0 of player's current inventory to stone named "name" with lore "lore"
    7. on inventory click:
    8.     if inventory name of player's current inventory is "hello":
    9.         if clicked slot is 0:
    10.             if name of clicked item is "name":
    11.                 make player execute command "hey"
    12.                 cancel event
    13.                 close player's inventory #use this to close someones inventory or remove it if u dont want it to close their inventory
Thread Status:
Not open for further replies.

Share This Page