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.

MiniKilian

New Member
Nov 6, 2021
7
0
1
24
Hello dear community, I have a little problem where I can't help myself. I scripted a GUI in code as below and put a command in there back there .. but it doesn't execute it .. it only executes vanilla commands .. a restart didn't bring anything!


Code:
command /spawngui:
  permission: spawn.gui
  permission message: {@pm} /SpawnGUI
  trigger:
    if {loc.spawn} is not set:
      if {spawn.sprache} is 0:
        send "{@p} Der Spawn wurde noch nicht gesetzt!"
      if {spawn.sprache} is 1:
        send "{@p} The spawn has not yet been set!"
    else:
      open chest with 1 row named "&cSpawn" to player
      wait 1 tick

      format slot 0 of player with light gray glass named " " with lore "" to close then run "spawngui"
      format slot 1 of player with light gray glass named " " with lore "" to close then run "spawngui"
      format slot 2 of player with light gray glass named " " with lore "" to close then run "spawngui"
      format slot 3 of player with light gray glass named " " with lore "" to close then run "spawngui"
      format slot 4 of player with grass block named "&aSpawn" with lore "" to close then run "spawn"
      format slot 5 of player with light gray glass named " " with lore "" to close then run "spawngui"
      format slot 6 of player with light gray glass named " " with lore "" to close then run "spawngui"
      format slot 7 of player with light gray glass named " " with lore "" to close then run "spawngui"
      format slot 8 of player with light gray glass named " " with lore "" to close then run "spawngui"
 
You don't have to return the player to the same menu on click on the gray glass. You can cut it after the "named " " ". It is formated as that item so it shouldn't let player take the glass. For the functional item, adding colon after "run" and one-more-tab-indented "teleport player to {loc.spawn}" in line under it should do the trick if {loc.spawn} are saved coordinates.
 
Status
Not open for further replies.