Solved Problem with opening menu while i'm in menu!

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

VojaFTW

Member
Jun 10, 2017
42
2
0
I have a problem with my hub server selector skript i have factions op factions and hcf server and i need when i click on diamond sword named Faction Servers open menu with faction servers but its not working. And one know issue with my skript is when i click right of diamodn sword than open me a menu with faction servers but when i click right diamond shovel open me the same menu but i need to when i click to shovel or diamodn sword to open me not same menus.

code_language.skript:
on right click with nether star:
        wait 1 tick
        open chest with 6 rows named "&cServer Selector" to player
        format slot 10 of player with bedrock named "&aCreative" with lore "&7Click to visit Creative server!" to close then run [bungeecord connect player to "creative"]
        format slot 12 of player with diamond sword named "&aFaction Servers" with lore "&7Click to choose Faction server!" to close
        format slot 14 of player with bow named "&aSkyPvP" with lore "&7Click to visit SkyPvP server!" to close then run [bungeecord connect player to "skypvp"]
        format slot 16 of player with soup named "&aKitPvP" with lore "&7Click to visit KitPvP server!" to close then run [bungeecord connect player to "kitpvp"]
        format slot 28 of player with 101 named "&aPrison" with lore "&7Click to visit Prison server!" to close then run [bungeecord connect player to "prison"]
        format slot 30 of player with grass block named "&aSkyBlock" with lore "&7Click to visit SkyBlock server!" to close then run [bungeecord connect player to "skyblock"]
        format slot 32 of player with diamond shovel named "&aMiniGames" with lore "&7Click to choose Minigame server!" to close

on inventory click:
    if inventory name of player's current inventory is "&cServer Selector":
        if clicked slot is 12:
        wait a tick
        open chest with 3 rows named "&cFaction servers" to player
        format slot 10 of player with tnt named "&aFactions" with lore "&7Click to visit Factions server!" to close then run [bungeecord connect player to "factions"]
        format slot 12 of player with tnt named "&aOP Factions" with lore "&7Click to visit OP Factions server!" to close then run [bungeecord connect player to "opfactions"]
        format slot 14 of player with ender pearl named "&aHCF" with lore "&7Click to visit HCF server!" to close then run [bungeecord connect player to "hcf"]

on inventory click:
    if inventory name of player's current inventory is "&cServer Selector":
        if clicked slot is 32:
        wait a tick
        open chest with 3 rows named "&cMiniGame servers" to player
        format slot 10 of player with tnt named "&aFactions1" with lore "&7Click to visit Factions server!" to close then run [bungeecord connect player to "factions"]
        format slot 12 of player with tnt named "&aOP Factions" with lore "&7Click to visit OP Factions server!" to close then run [bungeecord connect player to "opfactions"]
        format slot 14 of player with ender pearl named "&aHCF" with lore "&7Click to visit HCF server!" to close then run [bungeecord connect player to "hcf"]
 
wiered.... Format slot... + Inventory Events... You should pick Tuske or other Methode for GUI...

Format slot is very buggy.

btw maybe try

close player's inventory when you click the slot...
 
thanks but i have a problem with when i click on diamond sword nothing happened and when i click on diamond shovel but when i click right of diamond sword or shovel open me inventory i need to open this inventories when i click to dmd sword or shovel (not same inventories).
 
thanks but i have a problem with when i click on diamond sword nothing happened and when i click on diamond shovel but when i click right of diamond sword or shovel open me inventory i need to open this inventories when i click to dmd sword or shovel (not same inventories).
Maybe you forgett one Tab? Because... look at your code.

if clicked slot is 12:
bla? [<tab>] missing?
 
Maybe you forgett one Tab? Because... look at your code.

if clicked slot is 12:
bla? [<tab>] missing?

everything is fine but i need a fix to when i click on dmd sword open me inventory with f servers and when i click on dmd shovel open me inventory with minigame serves but instead of that my current code open same inventory when i click right of dmd sword and same when i click right of dmd shovel, this is my problem not gui formating.
 
Status
Not open for further replies.