#gui help
1 messages ยท Page 1 of 1 (latest)
Phill suggests that you read this embed
GUIs are custom inventories that you can use from all sorts of purposes including shops and server selectors. There are two main ways to create them, using normal Skript and using the addon skript-gui
You won't need to download any extra addons to start making vanilla GUIs! Click Here to get started
Before you start making GUIs with skript-gui, you will have to download the addon here
Once you are ready to begin, Click Here to get started!
This addon simplifies some of the steps of making GUIs such as listening for clicks
Tuske is an old addon used for creating GUIs. It has become very outdated and will break all of your code. If you still have this addon installed please switch to skript-gui
And how to solve this
use skript-gui
No need
remove the : in line 9
and switch line 25 to if name of event-inventory is โโ:
ik but skript gui in my opinion is just easier with all that and can save you on a few lines because you dont need to the whole on inventory click:
send code
looks like kiko got it spot on ๐
Already solved because he crossposted twice
Ok wait
I did that it's fixed but now these error occurred
Want me to send an example for an gui?
trigger:
#this creates an menu
set metadata tag "Menu" of player to chest inventory with 3 rows named "&f&lMenu"
open (metadata tag "Menu" of player) to player
#this sets all the slots to items
set slot 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, and 27 of player's current inventory to grey stained glass pane named "&7"
set slot 10 of player's current inventory to green stained glass pane named "&2Name example" with lore "&7Click this to do something."
#this makes it so you can't take items out of the menu
on inventory click:
if event-inventory = (metadata tag "Menu" of player):
cancel event
#this line can make the player do something, in this case it sends a message
if index of event-slot is 10:
if event-inventory = (metadata tag "Menu" of player):
send "&cThis does infact work" to player```
customize it yourself
But I need on join you get a compass or nether star as server selector
Can you do that
sure
I did the first bit, you can do the rest yourselfon join: #this creates an menu set metadata tag "Menu" of player to chest inventory with 3 rows named "&f&lMenu" open (metadata tag "Menu" of player) to player #this sets all the slots to items set slot 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, and 27 of player's current inventory to grey stained glass pane named "&7" set slot 10 of player's current inventory compass named "&2Name example" with lore "&7Click this to do something." #this makes it so you can't take items out of the menu on inventory click: if event-inventory = (metadata tag "Menu" of player): cancel event #this line can make the player do something, in this case it sends a message if index of event-slot is 10: if event-inventory = (metadata tag "Menu" of player): send "&cThis does infact work" to player
the indents dont work yet since im on my phone
what???
Instead of 0, 1, 2, 3...
You can do (integers from 0 to 26)
yeah ik this was a skript from a week ago
ah ok
once they click slot:
make player execute command "spawn" ?