i need help with gui

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

Lukioz

Member
Feb 9, 2018
1
0
0
123
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_language.skript:
command /testtfdf <player>:
    permission: pol.baud
    trigger:
        open chest with 1 row named "testt" to arg 1
        wait 3 ticks
        format slot 0 of arg 1 with lime wool named "&test1" to close then run [make console execute command "/ddsd %arg-1%"]
        format slot 8 of arg 1 with red wool named "&ctest2" to close then run [make console execute command "/ffsd %arg-1%"]
 
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_language.skript:
command /test:
    trigger:
        open chest with 3 rows named "hello" to player
        wait 1 ticks
        set slot 0 of player's current inventory to stone named "name" with lore "lore"

on inventory click:
    if inventory name of player's current inventory is "hello":
        if clicked slot is 0:
            if name of clicked item is "name":
                make player execute command "hey"
                cancel event
                close player's inventory #use this to close someones inventory or remove it if u dont want it to close their inventory
 
Status
Not open for further replies.