Aller au contenu
  • 0

Comment calculez tous les joueurs d'un monde


Question

11 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Essaye ça, en mettant le nom du monde après chaque commande:

command /listworld [<text>]:
   trigger:
       loop all players:
           loop-player is in world "%arg 1%":
               add loop-player to {listworld.%arg 1%::*}
               send "%{listworld.%arg 1}%" to player
               stop

command /resetlist [<text>]:
   trigger:
       clear {listworld.%arg 1%::*}

 

 

EDIT: En effet, la réponse précédente me semble plus propre xd

  • 0
Posté(e)

Les autres variables marche bien c'est juste {_playercount} qui me fait <none>

 

every 2 seconds:
   set {_playercount} to number of players in world "PvPArena"
   make all players execute command "/pvparena scoreboard"


       if arg 1 is "scoreboard":
           if player is in "PvPArena":
               display board named "&7[&ePvPArena&7]" to player
               make score "&bInfo &b&o>  " in board of player to 8
               make score "&7-----&8-&7-------" in board of player to 7
               make score "&6Morts: &e%{pvp.arena.mort.%player%}%" in board of player to 6
               make score "&6Kills: &e%{pvp.arena.kill.%player%}%" in board of player to 5
               make score "&7----------" in board of player to 4
               make score "&bJoueur: &e%{_playercount}%" in board of player to 3
               make score "&7[&ePvPArena&7]" in board of player to 2
               move display of player to sidebar

  • 0
Posté(e)

Je ne vois pas d'où pourrait venir l'erreur mais moi j'utilise ce code qui marche très bien:

every 1 second:
   delete {joueur.PvPArena}
   set {joueur.PvPArena} to 0
   loop all players:
       if loop-player's world is "PvPArena":
           add 1 to {joueur.PvPArena}

C'est cette variable là que tu dois utiliser: {joueur.PvPArena}

  • 0
Posté(e)
Essaye ça, en mettant le nom du monde après chaque commande:

command /listworld [<text>]:
   trigger:
       loop all players:
           loop-player is in world "%arg 1%":
               add loop-player to {listworld.%arg 1%::*}
               send "%{listworld.%arg 1}%" to player
               stop

command /resetlist [<text>]:
   trigger:
       clear {listworld.%arg 1%::*}

 

 

EDIT: En effet, la réponse précédente me semble plus propre xd

N'importe quoi, haha! set {_size} to size of all players is in world "World"

  • 0
Posté(e)
Je ne vois pas d'où pourrait venir l'erreur mais moi j'utilise ce code qui marche très bien:

every 1 second:
   delete {joueur.PvPArena}
   set {joueur.PvPArena} to 0
   loop all players:
       if loop-player's world is "PvPArena":
           add 1 to {joueur.PvPArena}

C'est cette variable là que tu dois utiliser: {joueur.PvPArena}

Merci sa marche :)

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