Aller au contenu
  • 0

Possible en Skript ?


Question

Posté(e)

Bonsoir, je me suis demandé si compacter ce code serai possible:

 

if {hearts.%player%} = 0:
               format slot 13 of player with 0 wither skeleton head named "&bUprizing" with lore "&7||&70 Uprizing soit 0,00 EUR" to be unstealable
           if {uprizing.%player%} = 1:
               format slot 13 of player with 1 wither skeleton head named "&bUprizing" with lore "&7||&71 Uprizing soit 0,10 EUR" to be unstealable
           if {uprizing.%player%} = 2:
               format slot 13 of player with 2 wither skeleton head named "&bUprizing" with lore "&7||&72 Uprizing soit 0,20 EUR" to be unstealable
           if {uprizing.%player%} = 3:
               format slot 13 of player with 3 wither skeleton head named "&bUprizing" with lore "&7||&73 Uprizing soit 0,30 EUR" to be unstealable
           if {uprizing.%player%} = 4:
               format slot 13 of player with 4 wither skeleton head named "&bUprizing" with lore "&7||&74 Uprizing soit 0,40 EUR" to be unstealable

 

Si le joueur à 1 Uprizing ça mets 1 tête sans avoir besoin de recopier à chaque fois.

2 réponses à cette question

Messages recommandés

  • 0
Posté(e)

format slot 13 of player with {uprizing.%player%} of wither skeleton head named "&bUprizing" with lore "&7||&70 Uprizing soit %0.10*{uprizing.%player%}% EUR" to be unstealable

A toi de voir si cela te conviens, mais plutôt qu'utiliser plein de "if" comme ça il y a les "switch"

  • 0
Posté(e)
format slot 13 of player with {uprizing.%player%} of wither skeleton head named "&bUprizing" with lore "&7||&70 Uprizing soit %0.10*{uprizing.%player%}% EUR" to be unstealable

A toi de voir si cela te conviens, mais plutôt qu'utiliser plein de "if" comme ça il y a les "switch"

Peut tu m'en dire plus s'il te plait ?

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