Aller au contenu
  • 0

Téléporter un joueur


Question

Posté(e)

Bonjours , en gros j’aimerais téléporter un joueurs quand il click sur une épée ( dans un GUI )

 

Voici un bout de mon code


on right click with diamond sword:
   wait 1 tick
   open chest with 1 rows named "&cKit" to player
   wait 1 tick
   format slot 0 of player with diamond sword named "&1Pot" to close then run [make player execute command "clear", "kit-pot" ]
command /kit-pot:
   trigger:
       equip player with diamond helmet of protection 2
       equip player with diamond chestplate of protection 2
       equip player with diamond leggings of protection 2
       equip player with diamond boots of protection 2
       give diamond sword of sharpness 3 , unbreaking 3 to player
       give 16 ender pearl to player
       give splash potion of healing 2 to player
       give splash potion of healing 2 to player
       give splash potion of healing 2 to player
       give splash potion of healing 2 to player
       give splash potion of healing 2 to player
       give splash potion of healing 2 to player
       give 64 steak to player

Comment je peux faire pour que le joueur sois TP a une coordonnée précise ?

 

Merci de vos réponse :)

7 réponses à cette question

Messages recommandés

  • 0
Posté(e)
set {_world} to "NomDeTonMonde" parsed as world
set {_loc} to position X, Y, Z of the world {_world}
teleport player to {_loc}

je mes sa dans mon trigger?

  • 0
Posté(e)
function xyz(x: number, y: number, z: number, w: text) :: location:
   set {_w} to "%{_w}%" parsed as world
   set {_loc} to position {_x}, {_y}, {_z} of the world {_world}
   return {_loc}

# Pour TP à des coordonnées précises :

teleport player to xyz(746, 64, 923, "Nom_Du_Monde")

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