Demande résolu ! merci
Je modifie deux trois truc car y'a une erreur 😄
puis ce seras bon normalement j'ai tester
Voici le code sans bug (Patch)
Merci à @Rush2Fer Pour le skript !
options:
gp_name: §7[§bGroupEdit§7]§r
gp_prefixlength: 16 # Longueur maximale du préfix, < ou = à 16
gp_cooldown: 30 days #Cooldown entre les modifications de prefix
on load:
set {gp_colors_name::*} to "bleu", "vert", "rose", "orange" and "blanc"
set {gp_colors_tag::*} to "§b", "§2", "§d", "§6" and "§f"
set {gp_blacklist::*} to "Helper", "Helpeuse", "Assistant", "Assistante", "Modérateur-Test", "Modératrice-Test", "Administrateur", "Administratrice", "Administrateur+", "Administratrice+", "Gérant", "Gérante", "Co-Fondateur", "Fondateur" and "Owner"
function ColorMatch(s: string) :: string:
loop {gp_colors_name::*}:
if loop-value = {_s}:
return {gp_colors_tag::%loop-index%}
return "error"
command /group <text> <text> <text>:
aliases: /gp
usage: §a/group §8(create|change) §9<prefix> §7<color>
permission: GP.PERM
permission message: Vous n'avez pas GP.PERM
trigger:
if arg-1 is "create" or "change":
if size of ({gp_blacklist::*} where ["%arg-2%" contains "%object input%"]) = 0:
set {_v} to ColorMatch(arg-3)
if {_v} = "error":
send "{@gp_name} §cLes couleurs: §7[§bBleu&7] §7[§2Vert§7] §7[§dRose§7] §7[§6Orange§7] §7[§fBlanc§7]"
else:
if arg-2's length <= {@gp_prefixlength}:
if difference between {gp_cooldown::%player%} and now < {@gp_cooldown}:
send "{@gp_name} §7Vous devez attendre §c%difference between {@gp_cooldown} and difference between {gp_cooldown::%player%} and now% §7avant d'utiliser la commande."
else:
if arg-1 is "change":
if player has permission "group.hasrole":
#Groupe déjà crée
command "mangaddv %player% prefix §7[%{_v}%%arg 2%§7] %{_v}%"
send "{@gp_name} §cModification terminée: §7[%{_v}%%arg 2%§7]"
else:
if arg-1 is "create":
#Création de groupe
command "mangadd %player%", "mangaddv %player% prefix §7[%{_v}%%arg 2%§7] %{_v}%", "manuadd %player% %player%" and "mangaddp %player% group.hasrole" #Création du groupe
send "{@gp_name} §cCréation terminée: §7[%{_v}%%arg 2%&7]"
set {gp_cooldown::%player%} to now
else:
send "{@gp_name} §7Le préfix indiqué est trop long §8({@gp_prefixlength} caractères max)"
else:
send "{@gp_name} §7Ce prefix n'est pas disponible."
else:
send "{@gp_name} §c Erreur d'arguments: &7La requête n'a pas pu être finalisée"