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.

Brok3nmind

Active Member
Feb 3, 2017
66
1
8
22
Germany
darkvoid.eu
code_language.skript:
command /test:
    trigger:
        open chest with 3 rows named "Test Inventory" to player
        wait 1 tick
        format slot 0 of player with compass named "&4COMPASS" to close then run ""
on inventory click:
    if inventory named "Test Inventory":
        if clicked item is compass:
            if name of tool is "&4COMPASS":
                send "I hope it works"

Can anyone help me because this dont work :/
 
code_language.skript:
command /test:
    trigger:
        open chest with 3 rows named "Test Inventory" to player
        wait 1 tick
        format slot 0 of player with compass named "&4COMPASS" to close then run ""
on inventory click:
    if inventory named "Test Inventory":
        if clicked item is compass:
            if name of tool is "&4COMPASS":
                send "I hope it works"

Can anyone help me because this dont work :/
If you want to excute a command/something else with format slot, you dont need on inventory click.

Example:
code_language.skript:
format slot 0 of player with compass to close then run [execute player command "/hub"]
If the player clicks that, it will execute /hub

But if you want vanilla GUIs, that dont need 'wait 1 tick' you need to use
code_language.skript:
set slot 0 of player's current inventory to compass
, and then test for inventory click.

If want to keep the SkQuery GUI (format slot),
then remove the inventory click event and use the format slot code I gave you above
 
Status
Not open for further replies.