Aller au contenu

Messages recommandés

Posté(e)

Bonjour,

Je tient un serveur minecraft en 1.8.9 

Je mis connais un peu en skript mais je ne trouve pas comment faire ça ?.

Je voudrais que quand un joueur est en dessous de la position Y = 25 ils soient téléporter au spawn

Merci bien ?

  • 2 semaines après...
Posté(e) (modifié)

@XarFyV, Je t'ai fais ça, Si tu as des problèmes dis le moi.

on join:
	if %{yposition.%player%}% is 25:
		execute console command "/spawn %player%"

on quit:
	if %{yposition.%player%}% is 25:
		execute console command "/spawn %player%"
		
on spawn:
	if %{yposition.%player%}% is 25:
		execute console command "/spawn %player%"
	
on load:
	if %{yposition.%player%}% is 25:
		execute console command "/spawn %player%"
		
on unload:
	if %{yposition.%player%}% is 25:
		execute console command "/spawn %player%"
		
on break:
	if %{yposition.%player%}% is 25:
		execute console command "/spawn %player%"
		
on place:
	if %{yposition.%player%}% is 25:
		execute console command "/spawn %player%"
		
on move:
	if %{yposition.%player%}% is 25:
		execute console command "/spawn %player%"
		
on any move:
	if %{yposition.%player%}% is 25:
		execute console command "/spawn %player%"
		
on walk:
	if %{yposition.%player%}% is 25:
		execute console command "/spawn %player%"

 

Modifié par TheMisterFreeZe
Posté(e) (modifié)
il y a 4 minutes, TheMisterFreeZe a dit :

@Darkmariosan, Tu as oublié de mettre un / avant le "spawn" ?

Cela n'est pas obliger vu que l'ont précise que la console/le/les joueurs  execute(s) la commande 

make [...] execute command ""

 

Modifié par Darkmariosan
  • 2 semaines après...
Posté(e)

Donc faisons ça rapidement: (et le on quit ne sert a rien TheMisterFreeZe)

on packet:
  if event-string is "PacketPlayInPosition" or "PacketPlayInPositionLook" or "PacketPlayInLook" or "PacketPlayInFlying":
    if y-coordinate of player < 25:
      teleport player to {spawn}

En 4 lignes de code c'est fini ...

Et beaucoup plus optimisé car TheMisterFreeZe uttilise des events et Darkmariosan des actions appelés des Tasks (Qui est le pire a uttiliser).

Posté(e)

Ah oui je n'avais pas vu @Wizzard1806

 

@MaxDu56YT, Tu voulais ce skript que pour qu'un seul monde ? Si oui voici le code :

on packet:
	if event-string is "PacketPlayInPosition" or "PacketPlayInPositionLook" or "PacketPlayInLook" or "PacketPlayInFlying":
		if player is in "tonmonde":
			if y-coordinate of player < 25:
      			teleport player to {spawn}

 

 

@MaxDu56YT, Tien :

on packet:
	if event-string is "PacketPlayInPosition" or "PacketPlayInPositionLook" or "PacketPlayInLook" or "PacketPlayInFlying":
		if player's world is "<worldname>":
			if y-coordinate of player < 25:
				teleport player to {spawn}

 

  • Rémi a verrouillé ce sujet
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.