Aller au contenu
  • 0

Petit bug d'affichage GUI


Question

Posté(e)

Bonjour ! Je travaille (ENCORE !) sur un Skript de hub pour mon serveur et j'ai un système de GUI pour "voyager" entre les hubs.

 

Voici le code :

 

command /menu <text>:
   trigger:
       if arg 1 is "hub":
           open chest with 4 rows named "&aHub" to player
           wait 1 second
           format slot 0 of player with 1 bed named "&6Hub1" with lore "&7Popularité &f%{joueurs.hub.1}% &7(%{statut.hub.presence.1}%&7)" to run [make player execute command "/hub 1"]
           format slot 1 of player with 1 bed named "&6Hub2" with lore "&7Popularité &f%{joueurs.hub.2}% &7(%{statut.hub.presence.2}%&7)" to run [make player execute command "/hub 2"]
           format slot 2 of player with 1 bed named "&6Hub3" with lore "&7Popularité &f%{joueurs.hub.3}% &7(%{statut.hub.presence.3}%&7)" to run [make player execute command "/hub 3"]
           format slot 35 of player with 1 bed named "&6Tu est sur le hub %{hub.%player%}%" to run [make player execute command "/menu hub"]

 

Il n'y a pas d'erreurs particulières sur la console mais 1/2 le GUI s'affiche mal, je vais m'expliquer :

Les items n'apparaissent pas (des fois ils apparaissent tous d'autres fois un seul ou deux...)

 

Voilà ! Si quelqu'un peut m'aider à régler le problème je lui serais fort reconnaissant !

 

Merci !

6 réponses à cette question

Messages recommandés

  • 0
Posté(e)

wait 2 tick


with bed

 

;) Pour moi cela fonctionne correctement, sinon essaye avec le code de @PsYZiiK ou celui de @Arwex .

 

Cdt, SwenCake

  • 0
Posté(e)

command /menu <text>:

trigger:

if arg 1 is "hub":

wait 2 ticks

open chest with 4 rows named "&aHub" to player

format slot 0 of player with 1 bed named "&6Hub1" with lore "&7Popularité &f%{joueurs.hub.1}% &7(%{statut.hub.presence.1}%&7)" to run [make player execute command "/hub 1"]

format slot 1 of player with 1 bed named "&6Hub2" with lore "&7Popularité &f%{joueurs.hub.2}% &7(%{statut.hub.presence.2}%&7)" to run [make player execute command "/hub 2"]

format slot 2 of player with 1 bed named "&6Hub3" with lore "&7Popularité &f%{joueurs.hub.3}% &7(%{statut.hub.presence.3}%&7)" to run [make player execute command "/hub 3"]

format slot 35 of player with 1 bed named "&6Tu est sur le hub %{hub.%player%}%" to run [make player execute command "/menu hub"]

  • 0
Posté(e)

[spoiler=Crédits :D]

Met un wait 2 ticks au lieu du 1 second pour voir ^^

 

with 1 bed item

 

wait 2 tick


with bed

 

;) Pour moi cela fonctionne correctement, sinon essaye avec le code de @PsYZiiK ou celui de @Arwex .

 

Cdt, SwenCake

 

command /menu <text>:

trigger:

if arg 1 is "hub":

wait 2 ticks

open chest with 4 rows named "&aHub" to player

format slot 0 of player with 1 bed named "&6Hub1" with lore "&7Popularité &f%{joueurs.hub.1}% &7(%{statut.hub.presence.1}%&7)" to run [make player execute command "/hub 1"]

format slot 1 of player with 1 bed named "&6Hub2" with lore "&7Popularité &f%{joueurs.hub.2}% &7(%{statut.hub.presence.2}%&7)" to run [make player execute command "/hub 2"]

format slot 2 of player with 1 bed named "&6Hub3" with lore "&7Popularité &f%{joueurs.hub.3}% &7(%{statut.hub.presence.3}%&7)" to run [make player execute command "/hub 3"]

format slot 35 of player with 1 bed named "&6Tu est sur le hub %{hub.%player%}%" to run [make player execute command "/menu hub"]

 

Remplace "1 bed" par "bed item".

 

 

Merci à tous !! Problème résolu !!

×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.