axel Posté(e) le 15 décembre 2018 Posté(e) le 15 décembre 2018 Version de minecraft / skript : 1.7.10 cauldron Type du skript : Skript de casier judiciaire Description du script : Bonjour, j'ai un serveur roleplay moddé sur lequel j'aimerai que les policiers puissent appliquer des infractions a un joueur . ex: (cj = casierjudiciaire) /cj add <player> <faute> : ajoute une infraction sur le casier judiciaire d'un joueur et y attribue un numéro (voir après) /cj show <player> : affiche toutes les infractions d'un joueur /cj remove <player> <number> : Enlève l'infraction n°<number> du casier d'un joueur. merci de votre compréhension, axel.
__MonsterKid__ Posté(e) le 17 décembre 2018 Posté(e) le 17 décembre 2018 options: PrefixCJ: &6[Casier Judiciaire] command /cj [<text>] [<offline player>] [<text>]: permission: perm.policier permission message: &cVous n'avez pas la permission d'exécuter cette commande. trigger: if arg 1 is not set: send "{@PrefixCJ} &cErreur: /cj <add,show,remove> <joueur> [<infraction>]" to player stop if arg 2 is not set: send "{@PrefixCJ} &cErreur: /cj <add,show,remove> <joueur> [<infraction>]" to player stop if arg 1 is "add": if arg 2 is set: if arg 3 is set: add "%arg 3%" to {casier.%arg 2%::*} send "{@PrefixCJ} &fVous avez ajouté l'infraction &b%arg 3% &fau joueur %arg 2%" to player stop else: send "{@PrefixCJ} &cErreur: /cj <add,show,remove> <joueur> [<infraction>]" to player stop if arg 1 is "show": if arg 2 is set: if arg 3 is not set: loop {casier.%arg 2%::*}: if {casier.%arg 2%::*} is equal to 0: send "{@PrefixCJ} &cCe joueur n'a aucune infraction!" to player stop else if {casier.%arg 2%::*} is greater than 0: add 1 to {_sanction} send "&7Infraction N°%{_sanction}%: &f%loop-value%" to player stop if arg 1 is "remove": if arg 2 is set: if arg 3 is set: set {_number} to "%arg 3%" parsed as a integer if {casier.%arg 2%::*} is equal to 0: send "{@PrefixCJ} &cCe joueur n'a aucune infraction! Il est donc impossible de lui en retirer." to player stop if {casier.%arg 2%::%arg 3%} is set: remove "%arg 3%" from {casier.%arg 2%::*} send "{@PrefixCJ} &fVous avez retiré l'infraction &b%arg 3% &fau joueur %arg 2%" to player stop else: send "{@PrefixCJ} &cCe joueur n'a pas d'infraction N°%arg 3%!" to player stop else: send "{@PrefixCJ} &cErreur: /cj <add,show,remove> <joueur> [<nombre de l'infraction>]" to player stop Pas encore testé mais normalement ça devrait marcher! ? 2
axel Posté(e) le 17 décembre 2018 Auteur Posté(e) le 17 décembre 2018 Parfait mais le /cj show ne fonctionne pas et on peux pas remove les infractions qu'on a fait :'/
Engine Posté(e) le 17 décembre 2018 Posté(e) le 17 décembre 2018 (modifié) Le 17/12/2018 à 18:09, axel a dit : et on peux pas remove les infractions qu'on a fait :'/ Tiens dit moi si tout marche Citation command /casier [<text>] [<player>] [<text>]: permission: police trigger: close player's inventory wait 2 ticks loop all players: arg 1 is loop-player set {_t} to true if {_t} is true: wait 1 ticks loop all players: if {casierstyl::%loop-player%} is true: add 1 to {players} set {_rows} to {players}/9 {_rows} is less than 1: set {_rows} to 1 {_rows} is more than 6: set {_rows} to 6 open chest with 6 rows named "&c&lInterPol" to player wait 1 tick format slot 53 of player with a 35:5 named "&c&lRetirer un avis de recherche" to close then run [message "&cLa commande /casier remove (Joueur)"] format slot 45 of player with a 35:5 named "&a&lAjouter un avis de recherche" to close then run [message "&cLa commande /casier add (Joueur) (Raison)"] set {_slot} to -1 delete {player::*} set {nb} to 0 set {_ind} to 0 set {format} to 0 loop players: if {casierstyl::%loop-player%} is true: add 1 to {nb} add loop-player to {player::*} loop {player::*}: add 1 to {_slot} add 1 to {_ind} set {play.%loop-value%} to loop-index set {_playersmax} to number of all players set {p.%{_slot}%} to loop-index add 1 to {format} if {_ind} is 1: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 2: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 3: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 4: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 5: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 6: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 7: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 8: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 9: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 10: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 11: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 12: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 13: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 14: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 15: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 16: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 17: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 18: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 19: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 20: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 21: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 22: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 23: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 24: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 25: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 26: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 27: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 28: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 29: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 30: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 31: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 32: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 33: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 34: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 35: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 36: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 37: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 38: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 39: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 40: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 41: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 42: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 43: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 44: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 46: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 47: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 48: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 49: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 50: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 51: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if {_ind} is 52: format slot {_slot} of player with loop-value's skull named "&e%loop-value%" with lore "&cRaison: &e%{raison.%loop-value%}% " to close if arg-1 is "add": if arg-2 is set: if arg-3 is set: set {raison.%arg 2%} to arg-3 set {casierstyl::%arg-2%} to true send "&aTu a bien ajouter l'avis de recherche sur %arg-2% raison: %arg-3%" to player make server execute command "/rdp Le policier %player% a lancer un avis de recherche sur &6%{nickname.%player%}% &8(&6%arg 2%&8) &e!" stop else: send "&cVous devez choisir un raison" to player else: send "&cVous devez choisir un joueur" to player if arg-1 is "remove": if arg-2 is set: delete {casierstyl::%arg-2%} delete {raison.%arg 2%} send "&cTu as bien enlever l'avis de recherche sur %arg-2%" to player else: send "&cVous devez choisir un joueur" to player on death of player: if {casierstyl::%player%} is true: delete {casierstyl::%player%} delete {raison.%player%} Modifié le 18 décembre 2018 par LeFragileDu29 Ajout d'un spoiler 1
axel Posté(e) le 17 décembre 2018 Auteur Posté(e) le 17 décembre 2018 merci bcp, je vias essayé plus tard merci de ton aide bro'
Engine Posté(e) le 17 décembre 2018 Posté(e) le 17 décembre 2018 à l’instant, axel a dit : merci bcp, je vias essayé plus tard merci de ton aide bro' Pas de problème c'est normale
Messages recommandés