Solved GUI close

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

DeinAmphetamin

New Member
Nov 28, 2018
5
0
0
27
How can I close the GUI when I press an item for example:

format slot 17 of player with Gray Stained Glass Pane named "AFK" to run [make player execute command "/afk"]

Hope for a good answer that helps me
 
then create another command. Have your gui execute that new command.
In that command, have it execute the afk command and then close the inventory
 
then create another command. Have your gui execute that new command.
In that command, have it execute the afk command and then close the inventory
Sorry, but i dont know waht u mean i do my first skript of my life ,, ;D

can u give me a example like
format slot 0 of player with Red Bed Named "&2&lSpawn" to run [make player execute command "/spawn"]

my brain think thats right
format slot 0 of player with Red Bed Named "&2&lSpawn" to run [make player execute command "/spawn"] then close
but whats wrong xDD
 
code_language.skript:
format slot 0 of player with Red Bed Named "&2&lSpawn" to run [make player execute command "/someCommand"]

command /someCommand:
    trigger:
        execute player command "/spawn"
        close current inventory of player

This is completely useless as this will do the exact same thing as closing the inventory before executing the command, but since you wanted to do it that way, here ya go!
 
code_language.skript:
format slot 0 of player with Red Bed Named "&2&lSpawn" to run [make player execute command "/someCommand"]

command /someCommand:
    trigger:
        execute player command "/spawn"
        close current inventory of player

This is completely useless as this will do the exact same thing as closing the inventory before executing the command, but since you wanted to do it that way, here ya go!
mhmmmm okay that was a bad exmapfe from me

i mean like format slot 0 of player with Red Bed Named "&2&lAFK" to run [make player execute command "/afk"]

the problem is that she do the command but dont close the inventory/GUI
 
Ive shown you 2 different ways to do it now.
1) the link I sent you shows how to close the gui and run a command
2) I sent you an example of using another command to close the inventory and run your command, (ie: /afk)
 
Ive shown you 2 different ways to do it now.
1) the link I sent you shows how to close the gui and run a command
2) I sent you an example of using another command to close the inventory and run your command, (ie: /afk)
yes u have give me 2 examples but nothing will help me :emoji_slight_smile:
but np thanks for your ideas and support :emoji_slight_smile:
[doublepost=1543406929,1543405695][/doublepost]
Ive shown you 2 different ways to do it now.
1) the link I sent you shows how to close the gui and run a command
2) I sent you an example of using another command to close the inventory and run your command, (ie: /afk)
finally, i have found self the
right way here is that waht i mean
format slot 0 of player with Nether Star Named "&c&lAFK" to close then run [make player execute command "/afk"]
i must use to learn to use my Brain right lol
 
yes u have give me 2 examples but nothing will help me :emoji_slight_smile:
but np thanks for your ideas and support :emoji_slight_smile:
[doublepost=1543406929,1543405695][/doublepost]
finally, i have found self the
right way here is that waht i mean
format slot 0 of player with Nether Star Named "&c&lAFK" to close then run [make player execute command "/afk"]
i must use to learn to use my Brain right lol
:emoji_wink:
Glad you got it to work :emoji_slight_smile:
 
Status
Not open for further replies.