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 Gui is closing when new gui get open buy command execute

Discussion in 'Skript' started by MomoHD, Dec 6, 2019.

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

    MomoHD Member

    Joined:
    Nov 23, 2019
    Messages:
    15
    Likes Received:
    0
    Hello, I have the problem with my Gui script that when I open the gui as a player and click on what executes a command that executes a 2ts GUI. Just the Gui is closed. when he runs the second GUI over the commnand in the chat. Open it normally.

    Here the Code:

    Code (Text):
    1.  
    2. command /menu:
    3.     permission: ulx.menu
    4.     trigger:
    5.         if player has permission "ulx.menu.owner":  
    6.             open chest with 1 row named "&b&lULX Menu" to player
    7.             wait 5 tick
    8.             format slot 0 of player with glowing blue stained glass pane named "&8Line" with lore "" to close
    9.             format slot 1 of player with glowing blue stained glass pane named "&8Line" with lore "" to close
    10.             format slot 2 of player with item frame named "&bChat"
    11.             with lore "&3Serverchat" to close then run [make player execute command "chatmenu"]
    12.             format slot 3 of player with fishing rod named "&bFun" with lore "&3Trolling Party" to close then run [make player execute command "funmenu"]
    13.             format slot 4 of player with compass named "&bTeleport" with lore "&3Radar - Teleporter" to close then run [make player execute command "teleportmenu"]
    14.             format slot 5 of player with glowing diamond axe named "&bUtility" with lore "&4&lBanhammer" to close then run [make player execute command "Utilitymenu"]
    15.             format slot 6 of player with paper named "&bVoting" with lore "&3Survey note" to close then run [make player execute command "votingmenu"]
    16.             format slot 7 of player with glowing blue stained glass pane named "&8Line" with lore "" to close
    17.             format slot 8 of player with glowing blue stained glass pane named "&8Line" with lore "" to close
    18.  
    19.         if player has permission "ulx.menu.default":
    20.             open chest with 1 row named "&b&lULX Menu" to player
    21.             wait 5 tick
    22.             format slot 0 of player with glowing blue stained glass pane named "&8Line" with lore "" to close
    23.             format slot 1 of player with glowing blue stained glass pane named "&8Line" with lore "" to close
    24.             format slot 2 of player with item frame named "&bChat" with lore "&3Serverchat" to close then run [make player execute command "chatmenu"]
    25.             format slot 3 of player with fishing rod named "&bFun" with lore "&3Trolling Party" to close then run [make player execute command "funmenu"]
    26.             format slot 4 of player with compass named "&bTeleport" with lore "&3Radar - Teleporter" to close then run [make player execute command "teleportmenu"]
    27.             format slot 5 of player with glowing diamond axe named "&bUtility" with lore "&4&lBanhammer" to close then run [make player execute command "Utilitymenu"]
    28.             format slot 6 of player with paper named "&bVoting" with lore "&3Survey note" to close then run [make player execute command "votingmenu"]
    29.             format slot 7 of player with glowing blue stained glass pane named "&8Line" with lore "" to close
    30.             format slot 8 of player with glowing blue stained glass pane named "&8Line" with lore "" to close
    31.            
    32. command /chatmenu:
    33.     permission: ulx.chatmenu
    34.     trigger:
    35.         if player has permission "ulx.chatmenu.owner":  
    36.             open chest with 1 row named "&b&lULX Menu &r&3- &f&lChat" to player
    37.             wait 5 tick
    38.             format slot 0 of player with glowing blue stained glass pane named "&8Line" with lore "" to close
    39.             format slot 1 of player with glowing blue stained glass pane named "&8Line" with lore "" to close
    40.             format slot 2 of player with red dye named "&c&lback" with lore "&cGo back to the Menu" to close then run [make player execute command "menu"]
    41.             format slot 3 of player with redstone named "&fasay" with lore "&7Send a message to currently connected admins" to close then run [make player execute command "asay"]
    42.             format slot 4 of player with barrier named "&fpsay" with lore "&7Send a private message to target" to close then run [make player execute command "psay"]
    43.             format slot 5 of player with clock named "&fthetime" with lore "&7Shows you the server time" to close then run [make player execute command "thetime"]
    44.             format slot 6 of player with lime dye named "&a&lNext Page" with lore "&aOpen the Utility Page" to close then run [make player execute command "utilitymenu"]
    45.             format slot 7 of player with glowing blue stained glass pane named "&8Line" with lore "" to close
    46.             format slot 8 of player with glowing blue stained glass pane named "&8Line" with lore "" to close
    47.             remove glowing blue stained glass pane named "&8Line" from the player's tool
    48.             remove glowing blue stained glass pane named "&8Line" from the player's tool
    49.             remove glowing blue stained glass pane named "&8Line" from the player's tool
    50.             remove glowing blue stained glass pane named "&8Line" from the player's tool
    51.             remove glowing blue stained glass pane named "&8Line" from the player's tool
    52.             remove glowing blue stained glass pane named "&8Line" from the player's tool
    53.            
    54.             if player has permission "ulx.chatmenu.default":
    55.             open chest with 1 row named "&b&lULX Menu &r&3- &f&lChat" to player
    56.             wait 5 tick
    57.             format slot 0 of player with glowing blue stained glass pane named "&8Line" with lore "" to close
    58.             format slot 1 of player with glowing blue stained glass pane named "&8Line" with lore "" to close
    59.             format slot 2 of player with red dye named "&c&lback" with lore "&cGo back to the Menu" to close then run [make player execute command "menu"]
    60.             format slot 3 of player with redstone named "&fasay" with lore "&7Send a message to currently connected admins" to close then run [make player execute command "asay"]
    61.             format slot 4 of player with barrier named "&fpsay" with lore "&7Send a private message to target" to close then run [make player execute command "psay"]
    62.             format slot 5 of player with clock named "&fthetime" with lore "&7Shows you the server time" to close then run [make player execute command "thetime"]
    63.             format slot 6 of player with lime dye named "&a&lNext Page" with lore "&aOpen the Utility Page" to close then run [make player execute command "utilitymenu"]
    64.             format slot 7 of player with glowing blue stained glass pane named "&8Line" with lore "" to close
    65.             format slot 8 of player with glowing blue stained glass pane named "&8Line" with lore "" to close
    66.            
    67.        
    68.    
    The normal player rank have all Gui Permission i added.
     
  2. ZeyKra_

    ZeyKra_ Active Member

    Joined:
    Dec 12, 2019
    Messages:
    109
    Likes Received:
    2
    I think it's because owner have the 2 permission

    Because first it's open the guy with the owner permission and because the owner have also the default permission i'ts open the gui with ulx.chatmenu.default perm

    so you must check if he have the default permission and not the owner permission

    Code (Text):
    1.         if player has permission "ulx.chatmenu.default":
    2.             if player has not permission "ulx.chatmenu.owner":
     
  3. MomoHD

    MomoHD Member

    Joined:
    Nov 23, 2019
    Messages:
    15
    Likes Received:
    0
    okay thanks
     
  4. ZeyKra_

    ZeyKra_ Active Member

    Joined:
    Dec 12, 2019
    Messages:
    109
    Likes Received:
    2
    mark this post solved :emoji_grinning:
     
  5. MomoHD

    MomoHD Member

    Joined:
    Nov 23, 2019
    Messages:
    15
    Likes Received:
    0
    I still have to test it. My computer went dead
    --- Double Post Merged, Jan 5, 2020, Original Post Date: Jan 5, 2020 ---
    But I believe you
     
Thread Status:
Not open for further replies.
Loading...