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.

Solved trouble with gui commands

Discussion in 'Skript' started by LogOfBread, Jul 14, 2021.

Thread Status:
Not open for further replies.
  1. LogOfBread

    LogOfBread Member

    Joined:
    Jun 29, 2021
    Messages:
    3
    Likes Received:
    1
    well i cannot find the place to put the if statement in the skript where it would only check when the gui slot is clicked since now its attempting to check when the gui is opened instead i feel like im missing the blatantly obvious place to put it but still trying learn since im bad with guis currently
    command /warps:
    trigger:
    open virtual chest inventory with size 3 named "&b&lWarps" to player
    format gui slot 2 of player with dirt to execute:
    if player has dirt:
    execute console command "/clearinventory %player% dirt 1"
    execute console command "/give %player% obsidian 1"
     
  2. AHappyLittleSloth

    Joined:
    Apr 22, 2020
    Messages:
    48
    Likes Received:
    4
    First off, please post your code in a code block like so:
    7222_81c26b2b6d41b955007edf4eac498c2e.png

    Also are you trying to create a vanilla gui or are you using addons like tuske?

    Code (Text):
    1. command /warps:
    2.   trigger:
    3.     open chest with 3 rows named "&b&lWarps" to player
    4.     if player has dirt:
    5.       format slot 2 of player with dirt to close then run [execute console command "/clear %player% dirt 1" and "/give %player% obsidian 1"]
    6.     else:
    7.       format slot 2 of player with dirt to close
    This is with vanilla gui's
     
Thread Status:
Not open for further replies.

Share This Page

Loading...