Aller au contenu
  • 0

tp aléatoire


Question

Posté(e)

j'ai un petit problème, j'arrive a définir les point mais quand je fais le /tp sa me tp au dernier point que j'ai set

 

command /setlocation <text>:
   trigger:
       player has permission "admin":
           set variable {location.%arg 1%} to location of player
           send "&aSpawn %arg 1% set en : &b%{location.%arg 1%}%"

command /tp:
   trigger:
       set {_random} to a random integer between 1 and 10
       wait 0.5 tick
       if {_random} is 1:
           teleport player to {location.1}
       if {_random} is 2:
           teleport player to {location.2}
       if {_random} is 3:
           teleport player to {location.3}
       if {_random} is 4:
           teleport player to {location.4}
       if {_random} is 5:
           teleport player to {location.5}
       if {_random} is 6:
           teleport player to {location.6}
       if {_random} is 7:
           teleport player to {location.7}
       if {_random} is 8:
           teleport player to {location.8}
       if {_random} is 9:
           teleport player to {location.9}
       if {_random} is 10:
           teleport player to {location.10}

7 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Essaye de set ta variable "{_random}'' avant le random integer a 1.

  • 0
Posté(e)

Y a plus opti' :

 

Code:

set {_random} to a random integer between 1 and 10

wait a tick

teleport player to {location.%{_random}%}

 

si on se fait tp sa nous tp a une des location de spawn ?

  • 0
Posté(e)

Merci mais j'ai un probleme avec des variables en fait je vais faire un truc genre : si il y a 2 joueur faire que la console execute la commande /commande merci de m'aider svp :)

  • 0
Posté(e)
j'ai un petit problème, j'arrive a définir les point mais quand je fais le /tp sa me tp au dernier point que j'ai set

 

command /setlocation <text>:
   trigger:
       player has permission "admin":
           set variable {location.%arg 1%} to location of player
           send "&aSpawn %arg 1% set en : &b%{location.%arg 1%}%"

command /tp:
   trigger:
       set {_random} to a random integer between 1 and 10
       wait 0.5 tick
       if {_random} is 1:
           teleport player to {location.1}
       if {_random} is 2:
           teleport player to {location.2}
       if {_random} is 3:
           teleport player to {location.3}
       if {_random} is 4:
           teleport player to {location.4}
       if {_random} is 5:
           teleport player to {location.5}
       if {_random} is 6:
           teleport player to {location.6}
       if {_random} is 7:
           teleport player to {location.7}
       if {_random} is 8:
           teleport player to {location.8}
       if {_random} is 9:
           teleport player to {location.9}
       if {_random} is 10:
           teleport player to {location.10}

tu peut faire

 

teleport player to {var} or {var} or {var} or {var} ect ect

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