Aller au contenu
  • 0

Probleme On inventory click


Question

Posté(e)

Bonjour,

 

J'ai un problème avec une des condition de mon skript et c'est au moment du "name of clicked item is "&aConstruit Bypass":" et de name of clicked item is "&cConstruit Bypass": que cela ne fonctionne plus et quand je fais un sk reload all aucune erreur ne s'affiche

 

voici mes addons :

WildSkript

SkQuery

Umbaska

skRayfal

skExtra

Randomsk

SQlibrary

 

voici le code

 

on rightclick with green music disc:
   if player is in "hub" or "spawn":
       if name of tool of player is "&2&lModeration &7&o(clique droit)":
           open chest with 1 rows named "&2&lModeration" to player
           wait 3 ticks
           if {block.use.%player%} isn't set:
               format slot 0 of player with 1 grass named "&aConstruit Bypass" to close
           if {block.use.%player%} is true:
               format slot 0 of player with 1 grass named "&cConstruit Bypass" to close
           if {block.use.%player%} is false:
               format slot 0 of player with 1 grass named "&aConstruit Bypass" to close

on inventory click:
   if inventory name of current inventory of player is "&2&lModeration":
       name of clicked item is "&aConstruit Bypass":
           set {block.use.%player%} to true
       name of clicked item is "&cConstruit Bypass":
           set {block.use.%player%} to false

 

Merci d'avance

15 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Ligne 2 :

if player is in "hub" or "spawn":

C'est comme ça plutôt :

if player's world is "hub" or "spawn":

  • 0
Posté(e)

non le "if player is in "hub" or "spawn":" marche tres bien c'est la condition "name of clicked item is" que cela bug et n’exécute pas la ligne de dessous

  • 0
Posté(e)

Je te donne ça, à toi de l'adapter à ton skript ;)

 

on rightclick with green music disc:
   name of player's tool is "&2&lModeration &7&o(clique droit)":
       send "&7Yep !" to player

command /givedisc:
   trigger:
       give 1 green music disc named "&2&lModeration &7&o(clique droit)" to player

  • 0
Posté(e)

Random le problème ne viens pas du on rightclick mes du inventory click et plus presicement

name of clicked item is "&aConstruit Bypass": et du

name of clicked item is "&cConstruit Bypass":

  • 0
Posté(e)

on rightclick with green music disc:
   if player is in "hub" or "spawn":
       name of player's tool is "&2&lModeration &7&o(clique droit)":
           open chest with 1 rows named "&2&lModeration" to player
           wait 3 ticks
           if {block.use.%player%} isn't set:
               format slot 0 of player with 1 grass named "&aConstruit Bypass" to close then run [make player execute command "bypassbuild"]
           if {block.use.%player%} is true:
               format slot 0 of player with 1 grass named "&cConstruit Bypass" to close then run [make player execute command "bypassbuild"]
           if {block.use.%player%} is false:
               format slot 0 of player with 1 grass named "&aConstruit Bypass" to close then run [make player execute command "bypassbuild"]

on inventory click:
   if inventory name of current inventory of player is "&2&lModeration":
       if "%clicked-item's name%" is "&aConstruit Bypass":
           set {block.use.%player%} to true
       if "%clicked-item's name%" is "&cConstruit Bypass":
           set {block.use.%player%} to false

 

J'ai essaye d'autre truc que j'ai trouver sur d'autre topic et je me suis inspirer de ce plugin pour le on inventory click

 

   inventory name of current inventory of player is "&9Panel Manager":
       cancel event
       name of clicked item is "&eModifications des motifs":
           open chest with 6 rows named "&9Les motifs :" to player
           wait 1 ticks
           format slot 0 of player with emerald block named "&aAjouter un motif" with lore "&7Clique pour ajouter un motif." to close
           unformat slot 0 of player
           set {_s} to 2
           loop {R.motifs::*}:
               format slot {_s} of player with book named "&e%loop-value%" with lore "&7Clique pour supprimer ce motif" to close
               unformat slot {_s} of player
               add 1 to {_s}
           stop

  • 0
Posté(e)

Pourquoi ne pas faire ça directement ?

 

on rightclick with green music disc:
   if player is in "hub" or "spawn":
       if name of tool of player is "&2&lModeration &7&o(clique droit)":
           open chest with 1 rows named "&2&lModeration" to player
           wait 3 ticks
           if {block.use.%player%} is true:
               format slot 0 of player with 1 grass named "&cConstruit Bypass" to close then run [set {block.use.%player%} to false]
           if {block.use.%player%} is false:
               format slot 0 of player with 1 grass named "&aConstruit Bypass" to close then run [set {block.use.%player%} to true]

 

J'sais pas si ça marche j'suis pas sur mon ordinateur

  • 0
Posté(e)
Avec mon code le problème est résolu.

 

Oui, c'est vrai...

 

Mais dis toi que, peut-être, @Krenteltv souhaite que son code

marche et savoir comment fonctionne le inventory click ! Je ne dis pas qu'il

le souhaite, mais, peut-être.

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