Aller au contenu
  • 0

"/spawn" sans bouger


Question

Posté(e)

Bonjour,

 

J'aimerai e l'aide afin de terminer mon skript, j'aimerai que quand bouge, sa annule la téléportation vers le spawn.

 

command /spawn:
   trigger:
       if player is in world "{@map}":
           message "{@logo2} &7Téléportation dans 4 secondes"
           wait 1 seconds
           message "{@logo2} &7Téléportation dans 3 secondes"
           wait 1 seconds
           message "{@logo2} &7Téléportation dans 2 secondes"
           wait 1 seconds
           message "{@logo2} &7Téléportation dans 1 seconde"
           wait 1 seconds
           message "{@logo2} &7Téléportation vers le spawn"
           make console execute command "/mv tp %player% colise"

12 réponses à cette question

Messages recommandés

  • 0
Posté(e)

command /spawn:
   trigger:
       if player is in world "{@map}":
           message "{@logo2} &7Téléportation dans 4 secondes"
           set {moveverif.%UUID of player%} to true
           wait 1 seconds
           message "{@logo2} &7Téléportation dans 3 secondes"
           {moveverif.%UUID of player%} is false
           wait 1 seconds
           message "{@logo2} &7Téléportation dans 2 secondes"
           {moveverif.%UUID of player%} is false
           wait 1 seconds
           message "{@logo2} &7Téléportation dans 1 seconde"
           {moveverif.%UUID of player%} is false
           wait 1 seconds
           message "{@logo2} &7Téléportation vers le spawn"
           set {moveverif.%UUID of player%} to false
           make console execute command "/mv tp %player% colise"

on any move:
   if {moveverif.%UUID of player%} is true:
       message "&c&oTéléportation annulée." to player
       set {moveverif.%UUID of player%} to false

on join:
   set {moveverif.%UUID of player%} to false

Essaie ça :)

  • 0
Posté(e)

Le code d'@EvanMartiin est bien trop sensible, si le joueur bouge la tête ça annulera le tp. Et puis il enregistre des variables et il utilise un évent qui s'active TRÈS souvent et donc fera lag un peu plus. Sur mon serveur j'utilise ce code (je l'ai juste adapté à toi.

command /spawn:
   trigger:
       player is in world "{@map}"
       send "{@logo2} &7Merci d'attendre 4 secondes sans bouger!" to player
       set {_lx} to x-location of player's location
       set {_ly} to y-location of player's location
       set {_lz} to z-location of player's location
       wait 1 second
       {_lx} is not x-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       {_ly} is not y-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       {_lz} is not z-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       send "{@logo2} &7Téléportation dans 3 secondes..." to player
       wait 1 second
       {_lx} is not x-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       {_ly} is not y-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       {_lz} is not z-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       send "{@logo2} &7Téléportation dans 2 secondes..." to player
       wait 1 second
       {_lx} is not x-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       {_ly} is not y-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       {_lz} is not z-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       send "{@logo2} &7Téléportation dans 1 seconde..." to player
       wait 1 second
       {_lx} is not x-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       {_ly} is not y-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       {_lz} is not z-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       make console execute command "/mv tp %player% colise"

  • J'aime 2
  • 0
Posté(e)
Le code d'@EvanMartiin est bien trop sensible, si le joueur bouge la tête ça annulera le tp. Et puis il enregistre des variables et il utilise un évent qui s'active TRÈS souvent et donc fera lag un peu plus. Sur mon serveur j'utilise ce code (je l'ai juste adapté à toi.

command /spawn:
   trigger:
       player is in world "{@map}"
       send "{@logo2} &7Merci d'attendre 4 secondes sans bouger!" to player
       set {_lx} to x-location of player's location
       set {_ly} to y-location of player's location
       set {_lz} to z-location of player's location
       wait 1 second
       {_lx} is not x-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       {_ly} is not y-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       {_lz} is not z-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       send "{@logo2} &7Téléportation dans 3 secondes..." to player
       wait 1 second
       {_lx} is not x-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       {_ly} is not y-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       {_lz} is not z-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       send "{@logo2} &7Téléportation dans 2 secondes..." to player
       wait 1 second
       {_lx} is not x-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       {_ly} is not y-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       {_lz} is not z-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       send "{@logo2} &7Téléportation dans 1 seconde..." to player
       wait 1 second
       {_lx} is not x-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       {_ly} is not y-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       {_lz} is not z-location of player's location:
           send "{@logo2} &cVous avez bougé!" to player
           stop
       make console execute command "/mv tp %player% colise"

Au passage, merci j'en avais besoin !!!!!!!!!! :p

  • 0
Posté(e)

Voici un code plus optimisé, général et pour n'importe quel nombre de secondes (il faut changer la variable {_i}):

command /spawn:
   trigger:
       set {_i} to 5
       set {_sec} to {_i}
       set {_lx} to x-location of player's location
       set {_ly} to y-location of player's location
       set {_lz} to z-location of player's location
       send "&6Téléportation dans &c%{_i}% &6secondes, merci de ne pas bouger!" to player
       loop {_i} times:
           wait 1 second
           set {_sec} to {_sec} - 1
           if {_sec} is greater than 0:
               {_lx} is not x-location of player's location:
                   send "&cVous avez bougé! Téléportation annulée!" to player
                   stop
               {_ly} is not y-location of player's location:
                   send "&cVous avez bougé! Téléportation annulée!" to player
                   stop
               {_lz} is not z-location of player's location:
                   send "&cVous avez bougé! Téléportation annulée!" to player
                   stop
               send "&6Téléportation dans &c%{_sec}% &6secondes..." to player
           else:
               teleport player to {spawn}
               stop

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