Aller au contenu
Shykuzo

inactif ✖ Problème Signalements

Messages recommandés

Version de Minecraft : 1.9.x - 1.12.x (Native: 1.9.4)
Version de Skript : 2.2-Dev27

Addons utilisés: SkQuery, TuSKe, SkRayFall, SkUtilities, ExtraSK, SKExtras, Skore, WildSkript & Umbaska (J'en ai sûrement d'autres mais je m'en rappelle pas)

Type du skript : Système de Signalement.

Description du script :

Bonjour à tous et à toutes !
J'ai terminé de développer le système de Signalement de mon serveur hier soir mais j'ai encore quelques petits problèmes qui me prennent beaucoup trop la tête.
Enfaite, quand je fais "/report Shykuzo", je sélectionne une raison, un livre enchanté s'ajoute dans un menu que seul les personnes ayant un grade au dessus du grade "Assistant" inclus, peuvent ouvrir à l'aide de la commande "/rc", jusque là tout ce passe bien mais c'est lors du clique sur le serveur pour confirmer que le signalement à bien été vu que sa coince.

Enfaite, quand je clique dessus (Et qu'il y a plusieurs signalements.), sa supprime pas le signalement sur lequel j'ai cliqué mais sa supprime le dernier signalement effectué et je sais pourquoi mais je ne sais pas comment le réglé sans tout faire bugué.

J'espère que vous saurez m'aider,

Bonne journée à tous et à toutes !

Cordialement,
Shykuzo.

Code : (Fonction de suppression des signalements.)

Citation

function remove(p: player, t: text):
    set {_uuid} to uuid of {report.author::%{_t}%}
    remove {report.player::%{_t}%} from {report.%{_uuid}%}
    send "&8[&9Modération&8] &7Vous avez supprimé la plainte de &3%{report.author::%{_t}%}% &7!" to {_p}
    if {report.author::%{_t}%} is online:
        send "&8[&9Modération&8] &7Votre plainte à été supprimée !" to {report.author::%{_t}%}
    remove 1 from {number.report}
    delete {report.reason::%{_t}%}
    delete {report.player::%{_t}%}
    delete {report.author::%{_t}%}
    make {_p} execute command "/rc"


Code : (Fonction d'ajout des signalements.)

Citation

function report(p: player, a: offline player, r: text):
    send "&8[&9Modération&8] &7Votre signalement à bien été effectué !" to {_p}
    send " " to {_p}
    send "&7Signalement n°&3%{report.%{_p}%}%" to {_p}
    send " " to {_p}
    send "&7Votre Pseudo&8: &3%{_p}%" to {_p}
    send "&7Joueur Signalé&8: &3%{_a}%" to {_p}
    send "&7Raison&8: &c%{_r}%" to {_p}
    send "&7Date&8: &6%now%" to {_p}
    send " " to {_p}
    send "&8[&9Modération&8] &7Un Modérateur s'en occupera dès que possible, pensez à prendre une preuve !" to {_p}
    
    add "%{_p}%" to {report.author::*}
    add "%{_a}%" to {report.player::*}
    add "%{_r}%" to {report.reason::*}
    
    add 1 to {number.report}
    loop all players:
        if loop-player has permission "moderation.reports":
            send " " to loop-player
            send "  &c&lSignalement reçus &f&l» &6%{_p}%" to loop-player
            send " " to loop-player
    stop


Code : (Commande /report)

Citation

command /report [<offline player>] [<text>] [<text>] [<text>] [<text>]:
    trigger:
        if arg 1 is not set:
            send "{@prefix} &7Veuillez saisir le pseudo du joueur que vous souhaitez signaler à l'équipe de &9Modération &7!" to player
            stop
        else:
            if arg 1 is not online:
                send "{@prefix} &7Ce joueur n'est pas en ligne actuellement !" to player
                stop
            else:
                if arg 1 is "help":
                    send "{@prefix} &7Vous ne pouvez pas vous signaler vous même !" to player
                    stop
                else:
                    if arg 2 is not set:
                        wait 1 tick
                        open chest with 4 rows named "&cSignaler &8| &3%arg 1%" to player
                        wait 1 tick
                        set {_glass.1} to 0
                        set {_glass.2} to 27
                        loop 9 times:
                            format slot {_glass.1} of player with black glass named " " to be unstealable
                            format slot {_glass.2} of player with black glass named " " to be unstealable
                            add 1 to {_glass.1}
                            add 1 to {_glass.2}
                        format slot 10 of player with book and quill named "&5Anti&8-&5Knockback" with lore "&8&m-------------------------||&3Effet&8: &6Enlève/Baisse le recul après un coup.||&3Sanction&8: &c30 Jours de bannissement.||&8&m-------------------------" to close then run [make player execute command "/report %arg 1% Anti-Knockback"]
                        format slot 11 of player with book and quill named "&5Killaura&8/&5Forcefield" with lore "||&8&m--------------------||&3Effet&8: &6Frappe tout joueur dans un certain rayon.||&3Sanction&8: &c30 Jours de bannissement.||&8&m--------------------" to close then run [make player execute command "/report %arg 1% Killaura/Forcefield"]
                        format slot 12 of player with book and quill named "&5AutoArmor" with lore "||&8&m--------------------||&3Effet&8: &6Equipe automatiquement||&6des meilleures armures.||&3Sanction&8: &c30 Jours de bannissement.||&8&m--------------------" to close then run [make player execute command "/report %arg 1% AutoArmor"]
                        format slot 13 of player with book and quill named "&5AutoClick&8/&5Macro" with lore "||&8&m--------------------||&3Effet&8: &6Simule une série de clique très rapide.||&3Sanction&8: &c30 Jours de bannissement.||&8&m--------------------" to close then run [make player execute command "/report %arg 1% AutoClick/Macro"]
                        format slot 14 of player with book and quill named "&5Blink&8/&5Freecam" with lore "||&8&m--------------------||&3Effet&8: &6Voler sans être vu/Se téléporter.||&3Sanction&8: &c30 Jours de bannissement.||&8&m--------------------" to close then run [make player execute command "/report %arg 1% Blink/Freecam"]
                        format slot 15 of player with book and quill named "&5Criticals" with lore "||&8&m--------------------||&3Effet&8: &6Simule de petits sauts||&6pour donner que des coups critiques.||&3Sanction&8: &c30 Jours de bannissement.||&8&m--------------------" to close then run [make player execute command "/report %arg 1% Criticals"]
                        format slot 16 of player with book and quill named "&5Glide&8/&5Fly" with lore "||&8&m--------------------||&3Effet&8: &6Relentit la chutte/Vole.||&3Sanction&8: &c30 Jours de bannissement.||&8&m--------------------" to close then run [make player execute command "/report %arg 1% Glide/Fly"]
                        format slot 19 of player with book and quill named "&5Jesus&8/&5Speedhack" with lore "||&8&m--------------------||&3Effet&8: &6Marche sur l'eau/Courrir très vite.||&3Sanction&8: &c30 Jours de bannissement.||&8&m--------------------" to close then run [make player execute command "/report %arg 1% Jesus/Speedhack"]
                        format slot 20 of player with book and quill named "&5Fastplace&8/&5Fastbreak" with lore "||&8&m--------------------||&3Effet&8: &6Casse/Pose les blocs beaucoup plus vite.||&3Sanction&8: &c30 Jours de bannissement.||&8&m--------------------" to close then run [make player execute command "/report %arg 1% Fastplace/Fastbreak"]
                        format slot 21 of player with book and quill named "&5NoFall" with lore "||&8&m--------------------||&3Effet&8: &6Enlève les dégats de chutte.||&3Sanction&8: &c30 Jours de bannissement.||&8&m--------------------" to close then run [make player execute command "/report %arg 1% NoFall"]
                        format slot 22 of player with book and quill named "&5Regen&8/&5FastRegen" with lore "||&8&m--------------------||&3Effet&8: &6Regénère la vie plus rapidement.||&3Sanction&8: &c30 Jours de bannissement.||&8&m--------------------" to close then run [make player execute command "/report %arg 1% Regen/FastRegen"]
                        format slot 23 of player with book and quill named "&5Reach" with lore "||&8&m--------------------||&3Effet&8: &6Augmente la portée des coups.||&3Sanction&8: &c30 Jours de bannissement.||&8&m--------------------" to close then run [make player execute command "/report %arg 1% Reach"]
                        format slot 24 of player with book and quill named "&5Nuker&8/&5SpeedNuker" with lore "||&8&m--------------------||&3Effet&8: &6Casse plusieurs blocs||&6à la fois très rapidement.||&3Sanction&8: &c30 Jours de bannissement.||&8&m--------------------" to close then run [make player execute command "/report %arg 1% Nuker/SpeedNuker"]
                        format slot 25 of player with book and quill named "&5Climb&8/&5Spider" with lore "||&8&m--------------------||&3Effet&8: &6Monte sur les murs.||&3Sanction&8: &c30 Jours de bannissement.||&8&m--------------------" to close then run [make player execute command "/report %arg 1% Climb/Spider"]
                        stop
                    else:
                        if arg 2 is "Anti-Knockback", "Killaura/Forcefield", "AutoArmor", "AutoClick/Macro", "Blink/Freecam", "Criticals", "Glide/Fly", "Jesus/Speedhack", "Fastplace/Fastbreak", "NoFall", "Regen/FastRegen", "Reach", "Nuker/SpeedNuker" or "Climb/Spider":
                            report(player, argument-1, argument-2)
                            add "%arg 1%" to {report.%player's uuid%::*}
                        else:
                            send "{@prefix} &7Il semblerait qu'une erreur se soit produite, merci de contacter l'Administration pour qu'il soit réglé !" to player
                            stop


Code : (Commande /rc)

Citation

command /reportcheck:
    aliases: /rc
    trigger:
        if player has permission "moderation.reports":
            wait a tick
            open chest with 6 rows named "&c&lSignalements" to player
            wait a tick
            set {_slot} to 0
            set {_slot.2} to 45
            loop 9 times:
                format slot {_slot} of player with stained glass pane named " " to be unstealable
                format slot {_slot.2} of player with stained glass pane named " " to be unstealable
                add 1 to {_slot}
                add 1 to {_slot.2}
            format slot 49 of player with sunflower named "&6&lActualiser" to run [make player execute command "/rc"]
            set {_reportgui} to 9
            set {_author} to 1
            loop {report.author::*}:
                format slot {_reportgui} of player with shiny book named "&cPlainte n°&3%{number.report}%" with lore "||&7Auteur &8: &3%{report.author::%{_author}%}%||&7Accusé &8: &3%{report.player::%{_author}%}%||&7Raison &8: &3%{report.reason::%{_author}%}%" to run [make player execute command "/§reportcheck %{number.report}%"]
                add 1 to {_reportgui}
                add 1 to {_author}
                if {_reportgui} = 44:
                    stop
        else:
            send "{@prefix} &7Vos permissions sont insuffisantes !" to player
            stop
            
command /§reportcheck [<text>]: # Commande qui exécute la fonction "remove"
    trigger:
        remove(player, argument-1)


Vidéo utilisé pour développer ceci :

Contenu masqué

    Réagissez ou répondez à ce message afin de consulter le contenu masqué.

(On peut dire que j'étais déterminé car j'ai recopié le code à la main ...)

 

Partager ce message


Lien à poster
Partager sur d’autres sites
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.