Aller au contenu
  • 0

Beug de chat


Question

Posté(e)

Bonjour, j'ai un problème avec un de mes script en test:

Problème:

le chat global ne se débloque pas

Code:

 

On chat:
   if {lock.chat} is true:
       cancel event
       if {translate.fr.%UUID of player%} is true:
           send "&c&lLe chat est bloqué." to player
       if {translate.uk.%UUID of player%} is true:
           send "&c&lThe tchat is blocked" to player
   else if {lock.chat} is false:
       stop
   else if {lock.chat.%UUID of player%} is false:
       stop
   else if {lock.chat.%UUID of player%} is true:
       cancel event
       if {translate.fr.%UUID of player%} is true:
           send "&c&lTon chat est bloqué." to player
       if {translate.uk.%UUID of player%} is true:
           send "&c&lYou tchat is blocked" to player

       if arg 1 is "lock":
           if arg 2 is not set:
               if player has permission "skript.score.modo":
                   set {lock.chat} to true
                   broadcast "{@logo2}: &7Le chat a été bloqué par &c&l%player%"
           if arg 2 is set:
               if player has permission "skript.score.modo":
                   set {lock.chat.%UUID of arg 2%} to true
                   send "{@logo2}: &7Votre chat a été bloqué par &c&l%player%" to arg 2
       if arg 1 is "unlock":
           if arg 2 is not set:
               if player has permission "skript.score.modo":
                   set {lock.chat.} to false
                   broadcast "{@logo2}: &7Le chat a été débloqué par &c&l%player%"
           if arg 2 is set:
               if player has permission "skript.score.modo":
                   set {lock.chat.%UUID of arg 2%} to false
                   send "{@logo2}: &7Votre chat a été débloqué par &c&l%player%" to arg 2

Erreur:

Rien au reload mais quand je veux utiliser le chat après un lock/délock, ça me dis que le chat est toujours bloquer.

 

En espérant être aider,

Alessevan

2 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Bonjour;

J'ai refais ton skript, j'ai rajouté une permission pour les admins également.

 

command /tchat <text> [<offlineplayer>]:
   permission: chat.lock
   trigger:
       if arg 1 is "lock":
           if arg 2 is not set:
               set {WCChat.lock} to "true"
               send "§8§l» §7§oVous avez bien vérouiller le tchat pour les joueurs." to player
               stop
       if arg 1 is "unlock":
           if arg 2 is not set:
               delete {WCChat.lock}
               send "§8§l» §7§oVous avez bien dévérouiller le tchat pour les joueurs." to player
               stop
       if arg 1 is "lock":
           if arg 2 is set:
               set {WCChat.lock.%uuid of arg 2%} to "true"
               send "§8§l» §7§oVous avez bien vérouiller le tchat pour %arg 2%." to player
               stop
       if arg 1 is "unlock":
           if arg 2 is set:
               delete {WCChat.lock.%uuid of arg 2%}
               send "§8§l» §7§oVous avez bien dévérouiller le tchat pour %arg 2%." to player
               stop
       else:
           send "§f§o/tchat <lock/unlock> [player]" to player
on chat:
   if {WCChat.lock} is set:
       if player do not have permission "chat.lock":
           cancel event
           send "§8§l» §7§oDésolé, le tchat est actuellement fermé aux joueurs." to player
           stop
   if {WCChat.lock.%uuid of player%} is set:
       if player do not have permission "chat.lock":
           cancel event
           send "§8§l» §7§oDésolé, le tchat est actuellement fermé pour vous." to player
           stop
       else:
           stop
   else:
       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.