Aller au contenu

Messages recommandés

Posté(e)

Ah oui pardon, je n'ai pas fait attention.

 

J'ai testé le code cette fois-ci

 

command /matgame:
   trigger:
       open chest with 6 row named "&e&lItems gratuits" to player
       wait 1 tick
       set slot 1 of player's current inventory to diamond helmet
       set slot 2 of player's current inventory to diamond helmet
       set slot 3 of player's current inventory to diamond helmet
       set slot 4 of player's current inventory to diamond helmet
       set slot 5 of player's current inventory to diamond helmet
       set slot 6 of player's current inventory to diamond helmet
       set slot 7 of player's current inventory to diamond helmet
       set slot 8 of player's current inventory to diamond helmet
       set slot 9 of player's current inventory to diamond helmet

on rightclick on sign:
   if line 1 of block is "message":
       if line 2 of block is "message":
           if line 3 of block is "message":
               if line 4 of block is "message":
                   cancel event
                   if player has permission "matgame.sign":
                       make console execute "/matgame"
                   else:
                       message "&cDésolé %player%, tu n'as pas la permission requise pour utiliser ce panneau"

  • J'aime 1
Posté(e)

J'ai trouvé ça sur SkUnity

set cursor item of %player% to %itemstack%

Par contre il faut SkMorkaz

 

Du coup tu pourras faire quelque chose comme ça : (non-testé, et requiert TuSKe je pense):

format gui slot 1 of player with stone named "prend moi !" to run [set cursor item of player to stone]

Ou si ca ne fonctionne pas, tu peux créer une commande genre :

command /$blockcursor [<material>]:
   trigger:
       set cursor item of player to arg-1

Puis l'utiliser dans le format slot

format gui slot 1 of player with stone named "prend moi !" to run [make player execute command "/$blockcursor stone"]

 

voila ^^

Posté(e)
Ah oui pardon, je n'ai pas fait attention.

 

J'ai testé le code cette fois-ci

 

command /matgame:
   trigger:
       open chest with 6 row named "&e&lItems gratuits" to player
       wait 1 tick
       set slot 1 of player's current inventory to diamond helmet
       set slot 2 of player's current inventory to diamond helmet
       set slot 3 of player's current inventory to diamond helmet
       set slot 4 of player's current inventory to diamond helmet
       set slot 5 of player's current inventory to diamond helmet
       set slot 6 of player's current inventory to diamond helmet
       set slot 7 of player's current inventory to diamond helmet
       set slot 8 of player's current inventory to diamond helmet
       set slot 9 of player's current inventory to diamond helmet

on rightclick on sign:
   if line 1 of block is "message":
       if line 2 of block is "message":
           if line 3 of block is "message":
               if line 4 of block is "message":
                   cancel event
                   if player has permission "matgame.sign":
                       make console execute "/matgame"
                   else:
                       message "&cDésolé %player%, tu n'as pas la permission requise pour utiliser ce panneau"

Super sa marche merci =)

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.