1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

GUI

Discussion in 'Skript' started by MiniKilian, Nov 14, 2021.

Tags:
Thread Status:
Not open for further replies.
  1. MiniKilian

    MiniKilian New Member

    Joined:
    Nov 6, 2021
    Messages:
    7
    Likes Received:
    0
    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 (Text):
    1. command /spawngui:
    2.   permission: spawn.gui
    3.   permission message: {@pm} /SpawnGUI
    4.   trigger:
    5.     if {loc.spawn} is not set:
    6.       if {spawn.sprache} is 0:
    7.         send "{@p} Der Spawn wurde noch nicht gesetzt!"
    8.       if {spawn.sprache} is 1:
    9.         send "{@p} The spawn has not yet been set!"
    10.     else:
    11.       open chest with 1 row named "&cSpawn" to player
    12.       wait 1 tick
    13.  
    14.       format slot 0 of player with light gray glass named " " with lore "" to close then run "spawngui"
    15.       format slot 1 of player with light gray glass named " " with lore "" to close then run "spawngui"
    16.       format slot 2 of player with light gray glass named " " with lore "" to close then run "spawngui"
    17.       format slot 3 of player with light gray glass named " " with lore "" to close then run "spawngui"
    18.       format slot 4 of player with grass block named "&aSpawn" with lore "" to close then run "spawn"
    19.       format slot 5 of player with light gray glass named " " with lore "" to close then run "spawngui"
    20.       format slot 6 of player with light gray glass named " " with lore "" to close then run "spawngui"
    21.       format slot 7 of player with light gray glass named " " with lore "" to close then run "spawngui"
    22.       format slot 8 of player with light gray glass named " " with lore "" to close then run "spawngui"
     
  2. Allan Noyd

    Allan Noyd Member

    Joined:
    Apr 29, 2021
    Messages:
    33
    Likes Received:
    0
    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.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...