#Skript GUI Help

1 messages · Page 1 of 1 (latest)

shrewd bough
#

command /help:
trigger:
set {_gui1} to a new chest inventory with 3 row with name "&3&l Tutorial"
set slot 0,1,2,3,4,5,6,7,8,9,10,12,14,16,17,18,19,20,21,22,23,24,25 and 26 of {_gui1} to black stained glass pane named " "
set slot 11 of {_gui1} to paper named "&cRules" with lore "&7Click to see server rules"
open {_gui1} to player

on inventory click:
if name of event-inventory is "&3&l Tutorial":
if index of event-slot = 0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10 or 12 or 13 or 14 or 15 or 16 or 17 or 18 or 19 or 20 or 21 or 22 or 23 or 24 or 25 or 26:
cancel event

I made a /rules gui and want it so that when you click on the paper you run that command. Can some1 help me please?

glad haven
#

On inventory click
If name of event-inventory is Tutorial
If index of event-slot is 11
Close players current inventory
Execute player command /rules

shrewd bough
#

ty ill try that

glad haven
#

You’re right

shrewd bough
#

what?

glad haven
#

You’re right, something is wrong

#

Fix it and you’ll be set. It’s just syntax

shrewd bough
#

srry i am like 1 hour new to skript what is syntax

glad haven
#

Rules for writing code

#

:, “”, -, etc

#

Tabs

#

Missing : and “”

shrewd bough
#

where

#

its an indentation error

zenith badger
#

Execute player command "/rules"

shrewd bough
zenith badger
#

Send screenshot

#

Of error

shrewd bough
zenith badger
#

Read ur error ._.

#

If index of event-slot = 11:

#

U miss the :

shrewd bough
zenith badger
#

U miss the :

shrewd bough
#

ok u fixed it

zenith badger
#

😊

shrewd bough
#

but line 16: cant understand close player's current inv

zenith badger
#

One sec

#

Send screenshot

#

Of error

shrewd bough
zenith badger
#

U can try
Close {_gui1}

shrewd bough
#

works

#

yay

#

tysm

zenith badger
#

Not sure it works tho

#

Np

shrewd bough
#

works

#

ty for all the help

zenith badger
#

👍

#

No problem