Aller au contenu
  • 0

Créer une liste de ban dans un GUI


Question

Posté(e)

Bonjour !, comme vous l'aviez lu au dessus je cherche à crée une Ban list dans un menu GUI

 

Voici mon skript:

command /test:
   trigger:
       open virtual chest inventory with size 6 named "&cBan Liste" to player
       wait 1 tick
       set {_slot} to 0
       loop all players in {_ban.list::*}:
           set {_head} to "%loop-player%" parsed as offline player
           format slot {_slot} of player with skull of {_head} named "&6%{_head}%" with lore "" to run [make console execute command ""]
           add 1 to {_slot}

(J'ai foiré les tabulations dans le copié collé de vous inquiétez pas je ne fais pas ce genre d'erreur)

 

Problème:

Quand j'effectue ma commande /test et bien il n'y a rien aucune tête de mon joueur test banni

 

J'espère avoir donné suffisamment d'info et Merci pour vos réponse régulière.

 

Ma commande de ban:

 

command /ban [<offlineplayer>] [<text>]:
   trigger:
               ban arg 1 due to "&4[&cBan&4] &7Vous avez été banni pour &c%arg 2%&f !"
               wait 1 tick
               strike lightning at the player
               wait 2 ticks
               kick arg 1 due to "&4[&cBan&4] &7Vous avez été banni pour &c%arg 2%&f !"
               broadcast "&4[&cBan&4] &7%arg 1% a été banni pour &c%arg 2%&7 !"
               set {motif.ban.%arg 1%} to arg 2
               set {time.ban.%arg 1%} to now
               add arg 1 to {ban.list::*}

8 réponses à cette question

Messages recommandés

  • 0
Posté(e)
Bonjour !, comme vous l'aviez lu au dessus je cherche à crée une Ban list dans un menu GUI

 

Voici mon skript:

command /test:
   trigger:
       open virtual chest inventory with size 6 named "&cBan Liste" to player
       wait 1 tick
       set {_slot} to 0
       loop all players in {_ban.list::*}:
           set {_head} to "%loop-player%" parsed as offline player
           format slot {_slot} of player with skull of {_head} named "&6%{_head}%" with lore "" to run [make console execute command ""]
           add 1 to {_slot}

(J'ai foiré les tabulations dans le copié collé de vous inquiétez pas je ne fais pas ce genre d'erreur)

 

Problème:

Quand j'effectue ma commande /test et bien il n'y a rien aucune tête de mon joueur test banni

 

J'espère avoir donné suffisamment d'info et Merci pour vos réponse régulière.

 

Ma commande de ban:

 

command /ban [<offlineplayer>] [<text>]:
   trigger:
               ban arg 1 due to "&4[&cBan&4] &7Vous avez été banni pour &c%arg 2%&f !"
               wait 1 tick
               strike lightning at the player
               wait 2 ticks
               kick arg 1 due to "&4[&cBan&4] &7Vous avez été banni pour &c%arg 2%&f !"
               broadcast "&4[&cBan&4] &7%arg 1% a été banni pour &c%arg 2%&7 !"
               set {motif.ban.%arg 1%} to arg 2
               set {time.ban.%arg 1%} to now
               add arg 1 to {ban.list::*}

"add arg 1 to {ban.list::*}" dans ta commande de ban, ok ?

"loop all players in {_ban.list::*}:" dans ton gui , pourquoi ?

 

Change loop all players in {_ban.list::*} par loop {ban.list::*}

Et sa va marcher ^^

 

Like si je t'es aidé!

  • 0
Posté(e)
"add arg 1 to {ban.list::*}" dans ta commande de ban, ok ?

"loop all players in {_ban.list::*}:" dans ton gui , pourquoi ?

 

Change loop all players in {_ban.list::*} par loop {ban.list::*}

Et sa va marcher ^^

 

Like si je t'es aidé!

ça ne fonctionne toujours pas :/

 

Erreur: There's no loop matches 'loop-player'

  • 0
Posté(e)
ça ne fonctionne toujours pas :/

as tu une erreur? Car "sa march po"

sa m'aide pas ^^

 

Et change la ligne :

format slot {_slot} of player with skull of {_head} named "&6%{_head}%" with lore "" to run [make console execute command ""]

par :

format slot {_slot} of player with skull of {_head} named "&6%{_head}%" with lore "" to do nothing

  • 0
Posté(e)
as tu une erreur? Car "sa march po"

sa m'aide pas ^^

 

Et change la ligne :

format slot {_slot} of player with skull of {_head} named "&6%{_head}%" with lore "" to run [make console execute command ""]

par :

format slot {_slot} of player with skull of {_head} named "&6%{_head}%" with lore "" to do nothing

Maintenant 2 erreurs:

1 erreur: There's no loop that matches 'loop-player'

2e erreur: Can't understand this condition/effect: format slot {_slot} of player with skull of {_head} named "&6%{_head}%" with lore "" to do nothing

  • 0
Posté(e)
as tu une erreur? Car "sa march po"

sa m'aide pas ^^

 

Et change la ligne :

format slot {_slot} of player with skull of {_head} named "&6%{_head}%" with lore "" to run [make console execute command ""]

par :

format slot {_slot} of player with skull of {_head} named "&6%{_head}%" with lore "" to do nothing

J'avais prévu de mettre une commande ensuite --'

  • 0
Posté(e)
ça ne fonctionne toujours pas :/

 

Erreur: There's no loop matches 'loop-player'

J'ai refais ton code et voici,

command /test:
   trigger:
       open virtual chest inventory with size 6 named "&cBan Liste" to player
       wait 1 tick
       set {_slot} to 0
       loop {ban.list::*}:
           set {_head} to "%loop-value%" parsed as offline player
           format slot {_slot} of player with skull of {_head} named "&6%{_head}%" with lore "" to be unstealable
           add 1 to {_slot}

 

EDIT Si tu veux mettre une commande change to be unstealable par to close then run [make player execute command "/tacommande"] ou server command !

 

Like si je t'es aidé!

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