Aller au contenu
  • 0

gui de freeze


Question

Posté(e)

Bonjours,

 

Je fais un gui de skript en 1.9 version dev28.

 

Voici le code:

on disconnect:
   if {freeze.%uuid of player%} is true:
       cancel event
       make console execute command "/banip %player% 1200d deconnect en verif"
   else if {freeze.%uuid of player%} is true:
       stop

on any movement:
   if {freeze.%uuid of player%} is true:
       cancel event
       open chest with 3 rows named "&l&4Tu es freeze!" to player           
       wait 5 tick
       format slot 0 of player with red glass named "&cfreeze" to be unstealable
       format slot 1 of player with red glass named "&cfreeze" to be unstealable
       format slot 2 of player with red glass named "&cfreeze" to be unstealable
       format slot 3 of player with red glass named "&cfreeze" to be unstealable
       format slot 4 of player with red glass named "&cfreeze" to be unstealable
       format slot 5 of player with red glass named "&cfreeze" to be unstealable
       format slot 6 of player with red glass named "&cfreeze" to be unstealable
       format slot 7 of player with red glass named "&cfreeze" to be unstealable
       format slot 8 of player with red glass named "&cfreeze" to be unstealable
       format slot 9 of player with red glass named "&cfreeze" to be unstealable
       format slot 10 of player with red glass named "&cfreeze" to be unstealable
       format slot 12 of player with red glass named "&cfreeze" to be unstealable
       format slot 14 of player with red glass named "&cfreeze" to be unstealable
       format slot 16 of player with red glass named "&cfreeze" to be unstealable
       format slot 17 of player with red glass named "&cfreeze" to be unstealable
       format slot 18 of player with red glass named "&cfreeze" to be unstealable
       format slot 19 of player with red glass named "&cfreeze" to be unstealable
       format slot 20 of player with red glass named "&cfreeze" to be unstealable
       format slot 21 of player with red glass named "&cfreeze" to be unstealable
       format slot 22 of player with red glass named "&cfreeze" to be unstealable
       format slot 23 of player with red glass named "&cfreeze" to be unstealable
       format slot 24 of player with red glass named "&cfreeze" to be unstealable
       format slot 25 of player with red glass named "&cfreeze" to be unstealable
       format slot 26 of player with red glass named "&cfreeze" to be unstealable
       format slot 13 of player with paper named "&cTu es freeze!" to be unstealable
       format slot 15 of player with red clay named "&4Je ne cheat pas" to run [make console execute command "/freeze %player% nonavoue" and "/freeze %player% nonavoue" and "/mp %{_/freeze.%uuid of player%}% {@prefix2} &4Le &bjoueur &c%player% &4dit ne pas avoir cheat!"]
       format slot 11 of player with light green clay named "&2J'avoue mon cheat" to run [make console execute command "/banip %player% 700d cheating avoué"]
   else if {freeze.%uuid of player%} is false:
       stop

command /freeze [<player>] [<text>]:
   aliases: /f
   permission: freeze.sk   
   permission message: {@prefix2} &r&4You don't have permission to use this command!
   trigger:
       if arg 1 is not set:
           message "{@prefix2} &4Veuillez préciser le nom du joueur."
       else if arg 1 is set:
           if arg 2 is not set:
               if {freeze.%uuid of arg 1%} is set:
                   if {freeze.%uuid of arg 1%} is false:
                       set {_/freeze.%uuid of arg 1%} to "%player%"
                       set {freeze.%uuid of arg 1%} to true           
                       send "{@prefix1} &4Vous avez été freeze  par &2%player%&4!" to arg 1                               
                       open chest with 3 rows named "&l&4Tu es freeze!" to arg 1
                       wait 5 tick
                       format slot 0 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 1 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 2 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 3 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 4 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 5 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 6 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 7 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 8 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 9 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 10 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 12 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 14 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 16 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 17 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 18 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 19 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 20 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 21 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 22 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 23 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 24 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 25 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 26 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 13 of arg 1 with paper named "&cTu es freeze!" to be unstealable
                       format slot 15 of arg 1 with light green clay named "&4Je ne cheat pas" to run [make console execute command "/freeze %arg 1% nonavoue" and "/mp %{_/freeze.%uuid of arg 1%}% {@prefix2} &4Le &bjoueur &c%arg 1% &4dit ne pas avoir cheat!"]
                       format slot 11 of arg 1 with red clay named "&2J'avoue mon cheat" to run [make console execute command "/banip %arg 1% 700d cheating avoué"]
                       loop all players:
                           if {grade.staff.%uuid of loop-player%} is set:
                               if {grade.staff.%uuid of loop-player%} is not "&4unrank":
                                   send "{@prefix2} &2%arg 1% &4a été freeze par &2%player%" to loop-players
                   else if {freeze.%uuid of arg 1%} is true:
                       message "{@prefix2} &4Le joueur &2%arg 1% &4est déja freeze!"
                       stop
               else if {freeze.%uuid of arg 1%} is not set:
                   set {_/freeze.%uuid of arg 1%} to "%player%"
                   set {freeze.%uuid of arg 1%} to true
                   send "{@prefix1} &4Vous avez été freeze  par &2%player%&4!" to arg 1   
                   open chest with 3 rows named "&l&4Tu es freeze!" to arg 1
                   wait 5 tick
                   format slot 0 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 1 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 2 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 3 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 4 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 5 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 6 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 7 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 8 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 9 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 10 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 12 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 14 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 16 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 17 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 18 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 19 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 20 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 21 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 22 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 23 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 24 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 25 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 26 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 13 of arg 1 with paper named "&cTu es freeze!" to be unstealable
                   format slot 15 of arg 1 with light green clay named "&4Je ne cheat pas." to run [make console execute command "/freeze %arg 1% nonavoue" and "/mp %{_/freeze.%uuid of arg 1%}% {@prefix2} &4Le &bjoueur &c%arg 1% &4dit ne pas avoir cheat!"]
                   format slot 11 of arg 1 with red clay named "&2J'avoue mon cheat." to run [make console execute command "/banip %arg 1% 700d cheating avoué"]
                   loop all players:
                       if {grade.staff.%uuid of loop-player%} is set:
                           if {grade.staff.%uuid of loop-player%} is not "&4unrank":
                               send "{@prefix2} &2%arg 1% &4a été freeze par &2%player%" to loop-players
           else if arg 2 is set:
               if arg 2 is "nonavoue":
                   open chest with 3 rows named "&l&4Tu n'avoue pas ton cheat!" to arg 1
                   wait 5 ticks
                   format slot 15 of arg 1 with light green dye named "&2J'accepte de me faire vérifier." to run [make console execute command "/freeze %arg 1% attente"]
                   format slot 11 of arg 1 with red dye named "&4Je n'accepte pas de me faire vérifier." to run [make console execute command "/banip %arg 1% 1000d refus de vérif"]                   
                   format slot 0 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 1 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 2 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 3 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 4 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 5 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 6 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 7 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 8 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 9 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 10 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 13 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 12 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 14 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 16 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 17 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 18 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 19 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 20 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 21 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 22 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 23 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 24 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 25 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 26 of arg 1 with red glass named "&cfreeze" to be unstealable

 

Le problème, c'est que quand la variable {_/freeze.%uuid of arg 1%} est mise pour envoyer des mp a ce joueur via la console, il s'envoie sauf quand:

 

Le joueur freeze fait ECHAP et fait un mouvement ce qui ouvre encore une fois le gui de freeze, mais par la console. Alors je fait un /mp %{_/freeze.%uuid of player%}% (text) pour pouvoir lui envoyer un message juste a celui qui est set a la variable. (dsl si vous comprenez pas) mais le problème c'est que le mp ne s'envoi pas a la personne lié a la variable.

 

Si vous ne me comprenez pas, dit le moi j'essaierais de détailler ou Skype: Nomitix [Leader de Crozium TeamRush,Youtuber]

2 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Je ne sais pas si j'ai tout compris x)

 

 

Mais dans "/mp %{_/freeze.%uuid of arg 1%}% {@prefix2}", j'suis pas sûr si le / est nécessaire. Enfin il me semble aussi que les deux marche.

 

Du coup de ce que j'ai compris c'est que le /mp envoie un message à l'arg 1 , dans ce cas au nom du joueur {_/freeze.%uuid of arg1%}

 

Tu peux essayer de faire

 

set {_var} to {_/freeze.%uuid of arg 1%} parsed as player

et envoyer le message à {_var} . Sinon je vois pas pourquoi ça ne marcherait pas !

 

PS : Il vaut mieux rajouter des conditions pour avertir le joueur si justement {_/freeze.%uuid of arg 1%} n'est pas connecté.

 

J'espère que toi aussi tu m'as compris ^^

  • 0
Posté(e)

on disconnect:
   if {freeze.%uuid of player%} is true:
       cancel event
       make console execute command "/banip %player% 1200d deconnect en verif"
   else if {freeze.%uuid of player%} is true:
       stop

command /freeze [<player>] [<text>]:
   aliases: /f
   permission: freeze.sk   
   permission message: {@prefix2} &r&4You don't have permission to use this command!
   trigger:
       if arg 1 is not set:
           message "{@prefix2} &4Veuillez préciser le nom du joueur."
       else if arg 1 is set:
           if arg 2 is not set:
               if {freeze.%uuid of arg 1%} is not set:
                   set {_p} to player
                   set {freeze.%uuid of arg 1%} to true         
                   send "{@prefix1} &4Vous avez été freeze    par &2%player%&4!" to arg 1
                   while {freeze.%uuid of arg 1%} is true:
                       open chest with 3 rows named "&l&4Tu es freeze!" to arg 1
                       wait 5 tick
                       format slot 0 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 1 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 2 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 3 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 4 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 5 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 6 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 7 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 8 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 9 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 10 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 12 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 14 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 16 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 17 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 18 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 19 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 20 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 21 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 22 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 23 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 24 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 25 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 26 of arg 1 with red glass named "&cfreeze" to be unstealable
                       format slot 13 of arg 1 with paper named "&cTu es freeze!" to be unstealable
                       format slot 15 of arg 1 with light green clay named "&4Je ne cheat pas" to run [make console execute command "/freeze %arg 1% nonavoue" and "/mp %{_p}% {@prefix2} &4Le &bjoueur &c%arg 1% &4dit ne pas avoir cheat!"]
                       format slot 11 of arg 1 with red clay named "&2J'avoue mon cheat" to run [make console execute command "/banip %arg 1% 700d cheating avoué"]
                   loop all players:
                       if {grade.staff.%uuid of loop-player%} is set:
                           if {grade.staff.%uuid of loop-player%} is not "&4unrank":
                               send "{@prefix2} &2%arg 1% &4a été freeze par &2%player%" to loop-players
               else:
                   message "{@prefix2} &4Le joueur &2%arg 1% &4est unfreeze!"
                   delete {freeze.%uuid of arg 1%}
                   stop
           else if arg 2 is set:
               if arg 2 is "nonavoue":
                   open chest with 3 rows named "&l&4Tu n'avoue pas ton cheat!" to arg 1
                   wait 5 ticks
                   format slot 15 of arg 1 with light green dye named "&2J'accepte de me faire vérifier." to run [make console execute command "/freeze %arg 1% attente"]
                   format slot 11 of arg 1 with red dye named "&4Je n'accepte pas de me faire vérifier." to run [make console execute command "/banip %arg 1% 1000d refus de vérif"]                   
                   format slot 0 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 1 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 2 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 3 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 4 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 5 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 6 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 7 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 8 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 9 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 10 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 13 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 12 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 14 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 16 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 17 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 18 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 19 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 20 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 21 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 22 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 23 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 24 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 25 of arg 1 with red glass named "&cfreeze" to be unstealable
                   format slot 26 of arg 1 with red glass named "&cfreeze" to be unstealable
               else if arg 2 is "attente":
                   Et après tu finis le Skript quand même je t'ai déjà bien avancé ^^

 

Voilà, je pense que c'est déjà mieux que le Skript en bazar que tu nous a laissé ^^ Après j'ai pas tout changé parce que j'veux que tu te retrouves dans ton Skript mais ya beauuucoup d'améliorations et d'optimisations à faire

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