Aller au contenu
  • 0

GUI classement spécifique


Question

Posté(e)

Bonsoir,

 

Je suis actuellement complètement bloqué sur un skript de X-ray: je voudrais faire une commande qui ouvre un GUI avec le classement des joueurs selon leur ratio de minage de diamant. Un "top X-ray" quoi..

Seul problème c'est que je n'ai pas trouvé comment faire ce classement !

[spoiler=Code qui permet de voir les stats de minage d'un joueur]

command /xray [<offline player>]:
   permission: {@permission_xray}
   permission message: {@permission_erreur}
   trigger:
       if arg 1 is not set:
           send "{@Prefix} &c&lVeuillez préciser un joueur &f&l!"
       if arg 1 is set:
           if "%{antixray.total.%uuid of arg 1%}%" is "0" or "1":
               send "{@Prefix} &aMinerais de &e%arg 1%&a:%newline%&bDiamant&7: &c%({antixray.diamant.%arg 1's uuid%} / {antixray.total.%arg 1's uuid%}) * 100%%%%newline%&eOr&7: &c%({antixray.or.%arg 1's uuid%} / {antixray.total.%arg 1's uuid%}) * 100%%%%newline%&fFer&7: &c%({antixray.fer.%arg 1's uuid%} / {antixray.total.%arg 1's uuid%}) * 100%%%%newline%&8Charbon&7: &c%({antixray.charbon.%arg 1's uuid%} / {antixray.total.%arg 1's uuid%}) * 100%%%%newline%&4Redstone&7: &c%({antixray.redstone.%arg 1's uuid%} / {antixray.total.%arg 1's uuid%}) * 100%%%%newline%&9Lapis-lazuli&7: &c%({antixray.lapis.%arg 1's uuid%} / {antixray.total.%arg 1's uuid%}) * 100%%%%newline%&2Émeraude&7: &c%({antixray.emeraude.%arg 1's uuid%} / {antixray.total.%arg 1's uuid%}) * 100%%%%newline%&7- &apour un total de &e%{antixray.total.%uuid of arg 1%}% &abloc miné" to player
           if "%{antixray.total.%uuid of arg 1%}%" isn't "0" or "1":
               send "{@Prefix} &aMinerais de &e%arg 1%&a:%newline%&bDiamant&7: &c%({antixray.diamant.%arg 1's uuid%} / {antixray.total.%arg 1's uuid%}) * 100%%%%newline%&eOr&7: &c%({antixray.or.%arg 1's uuid%} / {antixray.total.%arg 1's uuid%}) * 100%%%%newline%&fFer&7: &c%({antixray.fer.%arg 1's uuid%} / {antixray.total.%arg 1's uuid%}) * 100%%%%newline%&8Charbon&7: &c%({antixray.charbon.%arg 1's uuid%} / {antixray.total.%arg 1's uuid%}) * 100%%%%newline%&4Redstone&7: &c%({antixray.redstone.%arg 1's uuid%} / {antixray.total.%arg 1's uuid%}) * 100%%%%newline%&9Lapis-lazuli&7: &c%({antixray.lapis.%arg 1's uuid%} / {antixray.total.%arg 1's uuid%}) * 100%%%%newline%&2Émeraude&7: &c%({antixray.emeraude.%arg 1's uuid%} / {antixray.total.%arg 1's uuid%}) * 100%%%%newline%&7- &apour un total de &e%{antixray.total.%uuid of arg 1%}% &ablocs minés" to player

 

 

Vous pouvez jeter un coup d'oeil à ce que j'ai fait, même si c'est inutile et que ça ne marche pas x)

[spoiler=Code du /xraytop]

command /xraytop:
   permission: {@permission_xray}
   permission message: {@permission_erreur}
   trigger:
       open chest with 6 rows named "&7Top &c&lXray" to player
       set {_s} to 0
       wait 1 ticks
       add "3" to {classxray::*}
       delete {classxray::*}
       loop {joueur.first::*}:
           add "%{antixray.diamant.%loop-value's uuid%}%" parsed as integer to {classxray::*}
           set {nmbrxray.%{antixray.diamant.%loop-value's uuid%}%} to "%loop-index%"
       set {classxray::*} to {classxray::*} sorted from highest to lowest with output "@value"
       loop {classxray::*}:
           set {_xraytopplayer} to {joueur.first::%{nmbrxray.%loop-value%}%}
           set {_s} to "%loop-index%"
           format slot {_s} of player with skull of {_xraytopplayer} parsed as offline player named "&6&l%{_xraytopplayer}%" with lore "&bDiamant &c&l%loop-value%%%" to close
       delete {classxray::*}
       loop {joueur.first::*}:
           delete {nmbrxray.%{antixray.diamant.%loop-value's uuid%}%}

 

 

Voilà, donc si quelqu'un arrive à me faire ce classement, GG ! (et merci :p)

 

Merci d'avance !

0 réponse à cette question

Messages recommandés

Il n’y a pas encore eu de réponse à cette question

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