Solved trouble with gui commands

  • 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.

LogOfBread

Member
Jun 29, 2021
3
1
3
19
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"
 
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:
command /warps:
  trigger:
    open chest with 3 rows named "&b&lWarps" to player
    if player has dirt:
      format slot 2 of player with dirt to close then run [execute console command "/clear %player% dirt 1" and "/give %player% obsidian 1"]
    else:
      format slot 2 of player with dirt to close
This is with vanilla gui's
 
Status
Not open for further replies.