Aller au contenu
  • 0

On right click


Question

Posté(e)

Bonsoir,

 

Je suis entrain de créer un skript pour un serveur fac (pour les admins).

 

1) Mon problème c'est que je ne c'est pas comment faire pour ouvrir l'inventaire de quelqu'un par exemple en faisant clic droit avec un livre sur le joueur

 

2) Quand je clic droit avec une gunpowder named "Vanish [OFF]" passe à "Vanish [ON]" et quel sois enchanté pour le style :p

 

Avec la gunpowder je voudrais faire sa:

 

 

on right click with gunpowder:
   If name of tool of player is "&6Vanish &8[&4OFF&8]":
       make player execute command "/enchant unbreaking 1"
       make player execute command "/vanish"
       make player execute command "/rename &6Vanish_&8[&2ON&8]"
   else:
       If name of tool of player is "&6Vanish &8[&2ON&8]"
       make player execute command "/enchant remove"
       make player execute command "/vanish"
       make player execute command "/rename &6Vanish_&8[&4OFF&8]"

 

mais si possible sans utilisé de plugins pour rename ou enchant remove... (en plus propre)

 

Merci d'avance

 

Cordialement.

5 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Nouveau code :

on right click with gunpowder:
loop all players:
	if {vanish.%player%} is false:
		enchant the player's tool with unbreaking 1
		hide player to loop-player
		set name of player's tool to "&6Vanish_&8[&2ON&8]"
		set {vanish.%player%} to true
	else if {vanish.%player%} is true:
		enchant the player's tool with unbreaking 1
		reveal player to loop-player
		set name of player's tool to "&6Vanish_&8[&4OFF&8]"
		set {vanish.%player%} to false


on join:
set {vanish.%player%} to false

 

 

ou du genre car j'arrive pad avec lenchant et le nom

 

on right click with gunpowder:
loop all players:
	if name of player's tool is "&6Vanish_&8[&4OFF&8]":
		if {vanish.%player%} is false:
			enchant the player's tool with unbreaking 1
			hide player to loop-player
			set name of player's tool to "&6Vanish_&8[&2ON&8]"
			set {vanish.%player%} to true
		if name of player's tool is "&6Vanish_&8[&2ON&8]":
			if {vanish.%player%} is true:
				enchant the player's tool with unbreaking 1
				reveal player to loop-player
				set name of player's tool to "&6Vanish_&8[&4OFF&8]"
				set {vanish.%player%} to false

  • 0
Posté(e)

Pour ouvrir l'inventaire d'un joueur:

open the player's inventory for the player

----

Cela ouvre mon inventaire toujours

 

Et NoaGaming tes codes ne fonctionne pas pourtant il n'y a pas d'erreur :/

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