Aller au contenu
  • 0

[Scoreboard] Faire un timer


Question

Posté(e)

Je me suis lancer dans un skriptage d'un "plugin" d'uhc et je voudrais m'attaquer au timer mais je n'y arrive pas.

Pourriez-vous m'aidez merci d'avance !

coubat,

11 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Salut !

J'ai une petite idée:

command /board:
   trigger:
       display board named "&6UHC" to player
       make score "&6Timer (s) &c%{time}%" in board of player to 1
       move display of player to sidebar


every 1 second:
   make all players execute command "/board"
   add 1 to {time}

 

PS: Il te faut SkQuery

  • 0
Posté(e)
variables:
{secondes} = 0
{minutes} = 0

command /board:
trigger:
	display board named "&6UHC" to player
	make score "&6Timer (s) &c%{minutes}%:%{secondes}%"in board of player to 1
	move display of player to sidebar

every 1 second:
make all players execute command "/board"
add 1 to {secondes}
{secondes} is 60
add 1 to {minutes}
remove 60 from {secondes}

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

New code:

command /board:
   trigger:
       display board named "&6UHC" to player
       make score "&6Timer: &c%{time.m}%:%{time.s}%" in board of player to 1
       move display of player to sidebar


every 1 second:
   make all players execute command "/board"
   add 1 to {time.s}
   if {time.s} is 60:
       set {time.s} to 0
       add 1 to {time.m}

 

 

PS: Il te faut toujours SkQuery !

  • 0
Posté(e)

Merci !

Mais le scoreboard ce fait automatiquemen je voudrais que sa la fasse a tt le monde quand je fais /board et pas quand je me connect

  • 0
Posté(e)

Ok. Ceci devrai te satisfaire:

command /board:
   trigger:
       if {board} is true:
           display board named "&6UHC" to player
           make score "&6Timer: &c%{time.m}%:%{time.s}%" in board of player to 1
           move display of player to sidebar
       if {board} is false:
           display board named "&6UHC" to player
           make score "&6Timer: &c%{time.m}%/%{time.s}%" in board of player to 1

every 1 second:
   make all players execute command "/board"
   add 1 to {time.s}
   if {time.s} is 60:
       set {time.s} to 0
       add 1 to {time.m}


command /b <text>:
   trigger:
       if arg 1 is "on":
           set {board} to true
       if arg 1 is "off":
           set {board} to false

 

Quand tu fait /b on, il y a le Scoreboard et quand tu veut /b off il disparait !

Invité
Ce sujet ne peut plus recevoir de nouvelles réponses.
×
×
  • 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.