Aller au contenu
  • 0

Afficher les cœurs dans la tabList ?


Question

Posté(e)

Bonjour tout le monde !

J'aimerais afficher la vie des joueurs sous format de coeurs dans la TabList, j'ai donc essayé de passer par les commandes proposées par le vanilla :

 execute console command "/scoreboard objectives add coeur health"
       execute console command "/scoreboard objectives setdisplay list coeur"

Mais, étrangement, ça ne fonctionne pas... J'ai aussi essayer de le faire manuellement sans aucun succès...

Je pense que les plugins doivent faire buguer cette fonctionnalité du vanilla :/

Quelqu'un aurait-il une solution alternative ? :)

Merci d'avance ! ^^

10 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Je te remercie :)

Vu que je veux que ça s'actualise, je dois le mettre dans un every 1 tick ?

Autre question, j'applique déjà un formatage sur le pseudo du joueur, si j'en remet un autre comme ici, cela va-t-il incrémenter mon dernier formatage ou juste l'ajouter ?

  • 0
Posté(e)

Non alors je te conseille de l'ajouter dans celui que tu as déjà fait et pour éviter de faire trop lag fait pas de every 1 ticks fait juste :

on damage:
   set player tab name to <et tu met le code que tu as déjà mis>

  • J'aime 1
  • 0
Posté(e)

Voici mon skript :

if "%victim health%" is equal to "2":
                   set the player's tablist name to "%{teamColorTchat::%loop-index-1%}%%victim% &c❤"
               if "%victim health%" is equal to "4":
                   set the player's tablist name to "%{teamColorTchat::%loop-index-1%}%%victim% &c❤❤"
               if "%victim health%" is equal to "6":
                   set the player's tablist name to "%{teamColorTchat::%loop-index-1%}%%victim% &c❤❤❤"
               if "%victim health%" is equal to "8":
                   set the player's tablist name to "%{teamColorTchat::%loop-index-1%}%%victim% &c❤❤❤❤"
               if "%victim health%" is equal to "10":
                   set the player's tablist name to "%{teamColorTchat::%loop-index-1%}%%victim% &c❤❤❤❤❤"
               if "%victim health%" is equal to "12":
                   set the player's tablist name to "%{teamColorTchat::%loop-index-1%}%%victim% &c❤❤❤❤❤❤"
               if "%victim health%" is equal to "14":
                   set the player's tablist name to "%{teamColorTchat::%loop-index-1%}%%victim% &c❤❤❤❤❤❤❤"
               if "%victim health%" is equal to "16":
                   set the player's tablist name to "%{teamColorTchat::%loop-index-1%}%%victim% &c❤❤❤❤❤❤❤❤"
               if "%victim health%" is equal to "18":
                   set the player's tablist name to "%{teamColorTchat::%loop-index-1%}%%victim% &c❤❤❤❤❤❤❤❤❤"
               if "%victim health%" is equal to "20":
                   set the player's tablist name to "%{teamColorTchat::%loop-index-1%}%%victim% &c❤❤❤❤❤❤❤❤❤❤"

Mais ne fonctionne pas... :/

Il me met "health" is not an entity type

Merci d'avance :)

  • 0
Posté(e)

Voici :

on damage:
  # loop {teamName::*}:
       #loop {team::%loop-value%::*}:
        #   if "%loop-value-2%" is "%victim%":
               if "%victim health%" is equal to "2":
                   set the player's tablist name to "%{teamColorTchat::%loop-index-1%}%%victim% &c❤"
               if "%victim health%" is equal to "4":
                   set the player's tablist name to "%{teamColorTchat::%loop-index-1%}%%victim% &c❤❤"
               if "%victim health%" is equal to "6":
                   set the player's tablist name to "%{teamColorTchat::%loop-index-1%}%%victim% &c❤❤❤"
               if "%victim health%" is equal to "8":
                   set the player's tablist name to "%{teamColorTchat::%loop-index-1%}%%victim% &c❤❤❤❤"
               if "%victim health%" is equal to "10":
                   set the player's tablist name to "%{teamColorTchat::%loop-index-1%}%%victim% &c❤❤❤❤❤"
               if "%victim health%" is equal to "12":
                   set the player's tablist name to "%{teamColorTchat::%loop-index-1%}%%victim% &c❤❤❤❤❤❤"
               if "%victim health%" is equal to "14":
                   set the player's tablist name to "%{teamColorTchat::%loop-index-1%}%%victim% &c❤❤❤❤❤❤❤"
               if "%victim health%" is equal to "16":
                   set the player's tablist name to "%{teamColorTchat::%loop-index-1%}%%victim% &c❤❤❤❤❤❤❤❤"
               if "%victim health%" is equal to "18":
                   set the player's tablist name to "%{teamColorTchat::%loop-index-1%}%%victim% &c❤❤❤❤❤❤❤❤❤"
               if "%victim health%" is equal to "20":
                   set the player's tablist name to "%{teamColorTchat::%loop-index-1%}%%victim% &c❤❤❤❤❤❤❤❤❤❤"

  • 0
Posté(e)

essaye de mettre :

on damage:
   set {_life.%victim%} to victim health
   if {_life.%victim%} = "2": ...

Ou

on damage:
   set {_life.%victim%} to victim's health
   if {_life.%victim%} = "2": ...

  • 0
Posté(e)

J'ai trouver ça sur SkUnity :

 

Example:

set the player's health to 10 - the player's health
loop (argument + 2)/5 times:
   message "Two useless numbers: %loop-num*2 - 5%, %2^loop-num - 1%"
message "You have %health of player * 2% half hearts of HP!"

 

Essaye donc avec le %health of player% au lieu de player health ?

 

Je vient également de trouver ça :


Example:
message "You have %health% HP left."

  • J'aime 1
  • 0
Posté(e)
J'ai trouver ça sur SkUnity :

 

Example:

set the player's health to 10 - the player's health
loop (argument + 2)/5 times:
   message "Two useless numbers: %loop-num*2 - 5%, %2^loop-num - 1%"
message "You have %health of player * 2% half hearts of HP!"

 

Essaye donc avec le %health of player% au lieu de player health ?

 

Je vient également de trouver ça :


Example:
message "You have %health% HP left."

%health% est une expression qui revoie le nombre de coeurs restants sous forme de nombre. @Oromis il existe plusieurs plugins pour ça, car en Skript si tu as beaucoup de joueurs ça ferait laguer.

  • J'aime 1
  • 0
Posté(e)

Merci à vous deux ! :)

Effectivement je pense plutôt passer par un plugin, ce sera plus simple à gérer ! :)

En connais-tu un qui affiche sous format unicode ?

Et, cela supprimerai t-il mon formatage pour les pseudos ?

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