Aller au contenu
  • 0

Problème variables


Question

Posté(e)

Bonsoir,

 

J'ai actuellement un skript de report, mais j'ai un problème : quand un joueur a 2 reports, je vois bien les 2 têtes dans le GUI mais la même raison ! Ne faudrait-il pas faire 5 variables pour 5 raisons ?

Si oui quelqu'un pourrait-il m'aider à cela ?

 

[spoiler=Code]

#Skript de REPORT vers 0.5

options:

   delay: 30

   p: &7[&cREPORT&7] &f

#On join

on join:
   if {reports.%player%} is not set:
       set {reports.%player%} to 0
   if {reports.%player%} is equal to 0:
       set {reports.%player%} to 0


#Menu pour choisir la raison du report

command /report [<player>]:
   trigger:
       if arg 1 is not set:
           send "&7[&cREPORT&7] &f/report [player]" to player
           stop trigger
       if {cooldown.%player%} is not set:
           if arg 1 is not set:
               send "&7[&cREPORT&7] &f/report [player]" to player
               stop trigger
           else:
               set {cooldown.%player%} to true
               open chest with 6 rows named "{@p}" to player
               set {g} to 0
               loop 9 times:
                   format slot {g} of player with 160:8 named "&a" to be unstealable
                   add 1 to {g}
               set {g} to 9
               loop 5 times:
                   format slot {g} of player with 160:8 named "&a" to be unstealable
                   add 9 to {g}
               set {g} to 17
               loop 5 times:
                   format slot {g} of player with 160:8 named "&a" to be unstealable
                   add 9 to {g}
               set {g} to 45
               loop 9 times:
                   format slot {g} of player with 160:8 named "&a" to be unstealable
                   add 1 to {g}
               format slot 10 of player with book named "&c&lCheats ->" to be unstealable
               format slot 11 of player with paper named "&eKillAura" with lore "&fTouche instantanément toutes les cibles" to close then run [make player execute command "/reportsend %arg 1% KillAura"]
               format slot 12 of player with paper named "&eForceField" with lore "&fKillAura mais tape de plus loin et uniquement les joueurs" to close then run [make player execute command "/reportsend %arg 1% ForceField"]
               format slot 13 of player with paper named "&eTriggerBot" with lore "&fRobot qui combat à la place du joueur" to close then run [make player execute command "/reportsend %arg 1% TriggerBot"]
               format slot 14 of player with paper named "&eClicAimbot" with lore "&fAu clic, le joueur est visé" to close then run [make player execute command "/reportsend %arg 1% ClicAimbot"]
               format slot 15 of player with paper named "&eBowAimbot" with lore "&fSemblable au ClicAimbot mais pour les arcs" to close then run [make player execute command "/reportsend %arg 1% BowAimbot"]
               format slot 16 of player with paper named "&eRapidBow" with lore "&fPas de délai pour bander l'arc" to close then run [make player execute command "/reportsend %arg 1% RapidBow"]
               format slot 19 of player with book named "&c&lCheats ->" to be unstealable
               format slot 20 of player with paper named "&eAutoSneak" with lore "&fSneak automatiquement" to close then run [make player execute command "/reportsend %arg 1% AutoSneak"]
               format slot 21 of player with paper named "&eSpeedHack" with lore "&fCours très vite" to close then run [make player execute command "/reportsend %arg 1% SpeedHack"]
               format slot 22 of player with paper named "&eFlyHack" with lore "&fLe joueur fly" to close then run [make player execute command "/reportsend %arg 1% FlyHack"]
               format slot 23 of player with paper named "&eAntiKnockback" with lore "&fLe joueur ne prend pas le knockback" to close then run [make player execute command "/reportsend %arg 1% AntiKnockback"]
               format slot 24 of player with paper named "&eAutoArmor" with lore "&fLe joueur met l'armure automatiquement" to close then run [make player execute command "/reportsend %arg 1% AutoArmor"]
               format slot 25 of player with paper named "&eXray" with lore "&fLe joueur voit à travers les blocs" to close then run [make player execute command "/reportsend %arg 1% Xray"]
               format slot 28 of player with book named "&c&lCheats ->" to be unstealable
               format slot 29 of player with paper named "&eAutoPotion" with lore "&fLe joueur utilise automatiquement ses potions" to close then run [make player execute command "/reportsend %arg 1% AutoPotion"]
               format slot 30 of player with paper named "&eBlink" with lore "&fSimule un joueur qui lag, se tp" to close then run [make player execute command "/reportsend %arg 1% Blink"]
               format slot 31 of player with paper named "&eWaterWalk" with lore "&fCours vite dans l'eau" to close then run [make player execute command "/reportsend %arg 1% WaterWalk"]
               format slot 32 of player with paper named "&eLavaWalk" with lore "&fCours vite dans la lave" to close then run [make player execute command "/reportsend %arg 1% LavaWalk"]
               format slot 34 of player with nether star named "&e&lAutre -> Cheat" to close then run [make player execute command "/reportsend %arg 1% Cheat"]
               format slot 37 of player with book named "&a&lChat ->" to be unstealable
               format slot 38 of player with paper named "&eInsulte" with lore "&fLe joueur insulte dans le chat" to close then run [make player execute command "/reportsend %arg 1% Insulte"]
               format slot 39 of player with paper named "&ePub" with lore "&fLe joueur fait de la pub dans le chat" to close then run [make player execute command "/reportsend %arg 1% Pub"]
               format slot 43 of player with nether star named "&e&lAutre -> Chat" to close then run [make player execute command "/reportsend %arg 1% Chat"]
               if player have permission "moder":
                   clear {cooldown.%player%}
               else:
                   wait {@delay} seconds
                   clear {cooldown.%player%}
       if {cooldown.%player%} is set:
           send "{@p}Tu as déjà fais un report depuis &630 secondes &f!"
           stop trigger



#Commande de report   

command /reportsend <player> <text>:
   executable by: player and console
   trigger:
       add 1 to {reports.%arg 1%}
       set {raison.%arg 1%} to arg 2
       set {reporter.%arg 1%} to player
       add arg 1 to {reportlist::*}
       send "&6Le report a bien été enregistré, le staff va traiter ta demande !"
       loop all players:
           loop-player has permission "moder":
               send "{@p}&fLe joueur &c%arg 1% &fa été report pour &c%arg 2% &fpar &c%player%" to loop-player



#Voir les reports

command /reports:
   permission: moder
   trigger:
       wait 3 ticks
       open chest with 6 rows named "{@p}Admin list" to player
       wait 3 ticks
       set {_slot} to 0
       set {_size} to size of {reportlist::*}
       loop {reportlist::*}:
           set {_l} to loop-value
           evaluate "format slot {_slot} of player with skull of {_l} named ""&6%{_l}%"" with lore ""&c&l%{raison.%{_l}%}% &7report par &c&o%{reporter.%{_l}%}% &7et en a maintenant &c&n%{reports.%{_l}%}%"" to close then run [make player execute command ""/reportoptions %{_l}%""]"
           add 1 to {_slot}



#Commande de reset des reports

command /reportreset:
   permission: report.admin
   trigger:
       set {reports.%all players%} to 0
       clear {reportlist::*}
       send "{@p}&fLes reports ont bien étés reset"



#Menu du choix de la sentence

command /reportoptions <player>:
   permission: moder
   trigger:
       wait 3 ticks
       open chest with 5 rows named "{@p}Choisir peine" to player
       wait 3 ticks
       set {g} to 0
       loop 9 times:
           format slot {g} of player with 160:8 named "&a" to be unstealable
           add 1 to {g}
       set {g} to 9
       loop 3 times:
           format slot {g} of player with 160:8 named "&a" to be unstealable
           add 9 to {g}
       set {g} to 17
       loop 3 times:
           format slot {g} of player with 160:8 named "&a" to be unstealable
           add 9 to {g}
       set {g} to 36
       loop 9 times:
           format slot {g} of player with 160:8 named "&a" to be unstealable
           add 1 to {g}
       format slot 10 of player with skull of arg 1 named "&6%arg 1%" with lore "&c&l%{raison.%arg 1%}%" to be unstealable
       format slot 12 of player with 101 named "&cBan" to close then run [make player execute command "/menuban %arg 1%"]
       format slot 13 of player with 166 named "&eWarn" to close then run [make player execute command "/warn %arg 1% %{raison.%arg 1%}%"]
       format slot 14 of player with cobweb named "&aMute" to close then run [make player execute command "/menumute %arg 1%"]
       format slot 19 of player with sugar named "&fRetirer ce report" to close then run [make player execute command "/reportdelete %arg 1%"]
       format slot 34 of player with arrow named "&9Retour" to close then run [make player execute command "/reports"]



#Commande de suppression du report

command /reportdelete <player>:
   permission: moder
   trigger:
       if {reports.%arg 1%} is 0:
           send "{@p}Le joueur a déjà 0 report !"
       else:
           remove arg 1 from {reportlist::*}
           remove 1 from {reports.%arg 1%}
           send "{@p}Report &csupprimé"
           loop all players:
               loop-player has permission "moder":
                   send "{@p}Le joueur &c%player% &fa retiré un report de &c%arg 1%" to loop-player


#Menu choix du temps de ban

command /menuban <player>:
   permission: moder
   trigger:
       wait 3 ticks
       open chest with 3 rows named "&cChoix du temps de ban" to player
       wait 3 ticks
       set {g} to 0
       loop 9 times:
           format slot {g} of player with 160:8 named "&a" to be unstealable
           add 1 to {g}
       set {g} to 8
       format slot 9 of player with 160:8 named "&a" to be unstealable
       format slot 17 of player with 160:8 named "&a" to be unstealable
       set {g} to 18
       loop 9 times:
           format slot {g} of player with 160:8 named "&a" to be unstealable
           add 1 to {g}
       format slot 10 of player with 101 named "&cBan ->" to be unstealable
       format slot 12 of player with 38:6 named "&c15 jours" to close then run [make player execute command "/tempban %arg 1% 15days %{raison.%arg 1%}%"]
       format slot 13 of player with 37:0 named "&c30 jours" to close then run [make player execute command "/tempban %arg 1% 30days %{raison.%arg 1%}%"]
       format slot 14 of player with 38:5 named "&c90 jours" to close then run [make player execute command "/tempban %arg 1% 90days %{raison.%arg 1%}%"]
       format slot 15 of player with 38:4 named "&c180 jours" to close then run [make player execute command "/tempban %arg 1% 180days %{raison.%arg 1%}%"]
       format slot 16 of player with 38:0 named "&cA vie" to close then run [make player execute command "/ban %arg 1%"]



#Menu choix du temps de mute

command /menumute <player>:
   permission: moder
   trigger:
       wait 3 ticks
       open chest with 3 rows named "&cChoix du temps de mute" to player
       wait 3 ticks
       set {g} to 0
       loop 9 times:
           format slot {g} of player with 160:8 named "&a" to be unstealable
           add 1 to {g}
       set {g} to 8
       format slot 9 of player with 160:8 named "&a" to be unstealable
       format slot 17 of player with 160:8 named "&a" to be unstealable
       set {g} to 18
       loop 9 times:
           format slot {g} of player with 160:8 named "&a" to be unstealable
           add 1 to {g}
       format slot 10 of player with cobweb named "&cMute ->" to be unstealable
       format slot 12 of player with 38:6 named "&c1 heures" to close then run [make player execute command "/mute %arg 1% 1h"]
       format slot 13 of player with 37:0 named "&c6 heures" to close then run [make player execute command "/mute %arg 1% 6h"]
       format slot 14 of player with 38:5 named "&c1 jour" to close then run [make player execute command "/mute %arg 1% 1d"]
       format slot 15 of player with 38:4 named "&c1 semaine" to close then run [make player execute command "/mute %arg 1% 1w"]
       format slot 16 of player with 38:0 named "&cA vie" to close then run [make player execute command "/mute %arg 1%"]


command /rename [<text>]:
   permission: moder
   permission message: &fCommande inconnue.
   trigger:
       if arg 1 is not set:
           send "&fUtilise: &6/rename [nom]"
       if arg 1 is set:
       set name of player's tool to arg 1

 

 

 

Merci d'avance !

0 réponse à cette question

Messages recommandés

Il n’y a pas encore eu de réponse à cette question

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