Gui slot with if statement

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

MrGametop1

Member
Mar 10, 2017
36
0
6
24
Hello i am trying to make a if statement for formatting the gui slot but it dosent show up.


Code:
            if {_rankuptrue} is true:
                format gui slot 25 of player with active_redstone_lamp named "Rankup" with lore "Du kan godt ranke up" to close
            wait 1 tick
            if {_rankuptrue} is false:
                format gui slot 25 of player with redstone_lamp named "Rankup" with lore "Du kan ikke ranke up" to close
 
Hello i am trying to make a if statement for formatting the gui slot but it dosent show up.


Code:
            if {_rankuptrue} is true:
                format gui slot 25 of player with active_redstone_lamp named "Rankup" with lore "Du kan godt ranke up" to close
            wait 1 tick
            if {_rankuptrue} is false:
                format gui slot 25 of player with redstone_lamp named "Rankup" with lore "Du kan ikke ranke up" to close
you are using local variables
 
im guessing you want the rankup true/false to be a player thing, here is how


Code:
on join:
  if {canrankup::%player's uuid%} is not set:
    set {canrankup::%player's uuid%} to false

command /canrankup <player>:
  permission: op
  trigger:
    if {canrankup::%arg-1's uuid%} = true:
      set {canrankup::%arg-1's uuid%}  to false
      send "&cNow False" to player and arg-1
    else if {canrankup::%arg-1's uuid%} = false:
      set {canrankup::%arg-1's uuid%}  to true
      send "&aNow true" to player and arg-1

Then, your condition will be:


Code:
if {canrankup::%player's uuid%} is true:
  #gui

else if {canrankup::%player's uuid%} is false:
  #gui

I suggest using vanilla guis! (CLICK)

Hope this helped!
 
Status
Not open for further replies.