Aller au contenu

[Groupmanger] Limiter Le Nombre De Personne dans Un groupe


Messages recommandés

Posté(e)

Serveur Minecraft Sous Bukkit 1.7.10

 

Skript : Gui Menu Selections D'un Metier

 

Bonjour Je Fait Cette Demande Car J'ai un Skript De Choix De Metier Par Gui Menu :

 

command /jobs:
   permission: armacube.jobs
   permission message: &4Tu n'as pas la permission !
   trigger:
       open chest with 4 rows named "&aMétier" to player
       format slot 0 of player with Light green Wool named "&aGrade Basique" with lore "&aTout Les Grade Neutre" to close then run [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 1 of player with Leather Tunic named "&aCivil" with lore "&aGrade De Debut" to close then run [make player execute command "/commande0"]
       format slot 2 of player with Book named "&cMaire" with lore "&cDeviens Gérant De La Ville" to close then run [make player execute command "/commande1"]
       format slot 9 of player with Blue Wool named "&9Police" with lore "&9Tout Les Grade De La Police" to close then run  [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 10 of player with Chain Helmet named "&1Policier" with lore "&1Premier Grade De La Police" to close then run [make player execute command "/commande2"]
       format slot 18 of player with Yellow Wool named "&eLes Hors La Lois" with lore "&eTout Les Metier Ilégal" to close then run [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 19 of player with Sugar named "&6Rebelle" with lore "&6Enemi de la police" to close then run [make player execute command "/commande3"]

 

Et Je Voudrai A Sa Rajouter Une Limite De Joueur Dans Chaque Groupe Par Exemple SUr Le Grade Policier Dès Qu'il y a plus de 8 joueur plus personne ne peux rejoindre le groupe et sa lui mette un message d'erreur par exemple : "Il y a trop de joueur dans ce groupe"

 

Merci A Ceux Qui Pourront M'aider

Posté(e)
Serveur Minecraft Sous Bukkit 1.7.10

 

Skript : Gui Menu Selections D'un Metier

 

Bonjour Je Fait Cette Demande Car J'ai un Skript De Choix De Metier Par Gui Menu :

 

[ CODE ] [ / CODE ]command /jobs:

permission: armacube.jobs

permission message: &4Tu n'as pas la permission !

trigger:

open chest with 4 rows named "&aMétier" to player

format slot 0 of player with Light green Wool named "&aGrade Basique" with lore "&aTout Les Grade Neutre" to close then run [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]

format slot 1 of player with Leather Tunic named "&aCivil" with lore "&aGrade De Debut" to close then run [make player execute command "/commande0"]

format slot 2 of player with Book named "&cMaire" with lore "&cDeviens Gérant De La Ville" to close then run [make player execute command "/commande1"]

format slot 9 of player with Blue Wool named "&9Police" with lore "&9Tout Les Grade De La Police" to close then run [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]

format slot 10 of player with Chain Helmet named "&1Policier" with lore "&1Premier Grade De La Police" to close then run [make player execute command "/commande2"]

format slot 18 of player with Yellow Wool named "&eLes Hors La Lois" with lore "&eTout Les Metier Ilégal" to close then run [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]

format slot 19 of player with Sugar named "&6Rebelle" with lore "&6Enemi de la police" to close then run [make player execute command "/commande3"]

 

Et Je Voudrai A Sa Rajouter Une Limite De Joueur Dans Chaque Groupe Par Exemple SUr Le Grade Policier Dès Qu'il y a plus de 8 joueur plus personne ne peux rejoindre le groupe et sa lui mette un message d'erreur par exemple : "Il y a trop de joueur dans ce groupe"

 

Merci A Ceux Qui Pourront M'aider

impossible a lire rajouter ton code dans une balise de code comme te la dit

Salutations,

Merci de mettre ton code entre ces balises : [ CODE ] [ / CODE ] (sans espace)

Merci,

Gauvain

Posté(e)

command /jobs:
   permission: armacube.jobs
   permission message: &4Tu n'as pas la permission !
   trigger:
       open chest with 4 rows named "&aMétier" to player
       format slot 0 of player with Light green Wool named "&aGrade Basique" with lore "&aTout Les Grade Neutre" to close then run [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 1 of player with Leather Tunic named "&aCivil" with lore "&aGrade De Debut" to close then run [make player execute command "/commande0"]
       format slot 2 of player with Book named "&cMaire" with lore "&cDeviens Gérant De La Ville" to close then run [make player execute command "/commande1"]
       format slot 9 of player with Blue Wool named "&9Police" with lore "&9Tout Les Grade De La Police" to close then run  [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 10 of player with Chain Helmet named "&1Policier" with lore "&1Premier Grade De La Police" to close then run [make player execute command "/commande2"]
       format slot 18 of player with Yellow Wool named "&eLes Hors La Lois" with lore "&eTout Les Metier Ilégal" to close then run [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 19 of player with Sugar named "&6Rebelle" with lore "&6Enemi de la police" to close then run [make player execute command "/commande3"]

 

Voila c'est bon

Posté(e)
command /jobs:
   permission: armacube.jobs
   permission message: &4Tu n'as pas la permission !
   trigger:
       open chest with 4 rows named "&aMétier" to player
       format slot 0 of player with Light green Wool named "&aGrade Basique" with lore "&aTout Les Grade Neutre" to close then run [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 1 of player with Leather Tunic named "&aCivil" with lore "&aGrade De Debut" to close then run [make player execute command "/commande0"]
       format slot 2 of player with Book named "&cMaire" with lore "&cDeviens Gérant De La Ville" to close then run [make player execute command "/commande1"]
       format slot 9 of player with Blue Wool named "&9Police" with lore "&9Tout Les Grade De La Police" to close then run  [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 10 of player with Chain Helmet named "&1Policier" with lore "&1Premier Grade De La Police" to close then run [make player execute command "/commande2"]
       format slot 18 of player with Yellow Wool named "&eLes Hors La Lois" with lore "&eTout Les Metier Ilégal" to close then run [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 19 of player with Sugar named "&6Rebelle" with lore "&6Enemi de la police" to close then run [make player execute command "/commande3"]

 

Voila c'est bon

cool je vais regarder maintenant

Posté(e)

Je voudrai rajouter des slot au grade suivant par exemple pour le grade policier y mettre une interdiction de rejoindre si il y a deja 8 personne qui ont le grade et aussi afficher dans le gui menu quand tu passe la souris sur l'item de grade policier par exemple (0/8) pour preciser les places restant !

Posté(e)

bah tout simplement tu fait une variable pour chaque metier tell que "{nombredepersonne.metier}" et tu ajoute 1 a chaque fois que qulqun le rejoind et au moment de rejoindre le metier tu rajoute "if {nombredepersonne.metier} is smaller than x"

 

et pour l'affichage tu met "%{nombredepersonne.metier}%/8"

Posté(e)

Sauf que je n'arrive pas avec les variable pour ça que je demande ici ^^ je suis debutant de base j'ai un codeur java mais l'ouverture de mon serveur est dans 4 jour et du coup je fait d mon maximum pour remplacer des plugins qu'il n'a pas le temps de faire par des skript

 

bah tout simplement tu fait une variable pour chaque metier tell que "{nombredepersonne.metier}" et tu ajoute 1 a chaque fois que qulqun le rejoind et au moment de rejoindre le metier tu rajoute "if {nombredepersonne.metier} is smaller than x"

 

et pour l'affichage tu met "%{nombredepersonne.metier}%/8"

Pourrai tu me faire un exemple sur un des metier ?

 

Personne ne pourrai me faire un exemple sur mon skript ?

Posté(e)

command /jobs:
   permission: armacube.jobs
   permission message: &4Tu n'as pas la permission !
   trigger:
       open chest with 4 rows named "&aMétier" to player
       format slot 0 of player with Light green Wool named "&aGrade Basique" with lore "&aTout Les Grade Neutre" to close then run [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 1 of player with Leather Tunic named "&aCivil" with lore "&aGrade De Debut" to close then run [make player execute command "/commande0"]
       format slot 2 of player with Book named "&cMaire" with lore "&cDeviens Gérant De La Ville" to close then run [make player execute command "/commande1"]
       format slot 9 of player with Blue Wool named "&9Police" with lore "&9Tout Les Grade De La Police" to close then run  [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 10 of player with Chain Helmet named "&1Policier" with lore "&1Premier Grade De La Police" to close then run [make player execute command "/commande2"]
       format slot 18 of player with Yellow Wool named "&eLes Hors La Lois" with lore "&eTout Les Metier Ilégal" to close then run [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 19 of player with Sugar named "&6Rebelle" with lore "&6Enemi de la police" to close then run [make player execute command "/commande3"]
       format slot 27 of player with red Wool named "&4Grade Staff" with lore "&cTout Les Staff" to close then run [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 28 of player with Wooden Sword named "&bModérateur" with lore "&bDeviens Un Grand Modérateur De ArmaCube !" to close then run [send "&7&l[&cArmaJobs&7&l] &bTa Vraiment crue t'allais devenir Modérateur ? =')"]
       format slot 29 of player with Wooden Axe named "&4Admin" with lore "&cDeviens Le Meilleur Admin De France !" to close then run [send "&7&l[&cArmaJobs&7&l] &cTa Vraiment crue t'allais Devenir Admin ? =')"]

command /commande0:
   trigger:
       make player execute command "/manudel %player%"
       send "&7&l[&cArmaJobs&7&l] &eDe Retour Au Chomage ? =O "
       broadcast "&7&l[&cArmaJobs&7&l] &e %Player% Viens de retourner au chomage (civil)"
command /commande1:
   trigger:
       make player execute command "/maire"
       send "&7&l[&cArmaJobs&7&l] &eBonne Chance Au Election"
command /commande2:
   trigger:
       make player execute command "/manuadd %player% gendarme"
       send "&7&l[&cArmaJobs&7&l] &eBienvenue dans la Police %player% "
       broadcast "&7&l[&cArmaJobs&7&l] &e %Player% Viens de rejoindre les forces de L'ordre"
command /commande3:
   trigger:
       make player execute command "/manuadd %player% rebelle"
       send "&7&l[&cArmaJobs&7&l] &eBienvenue Du Côter Rebelle %player% ! "
       broadcast "&7&l[&cArmaJobs&7&l] &e %Player% Viens de rejoindre les Rebelles"

 

Voila tout est dedant

Posté(e)

Je ne sais pas si ça marche:

command /jobs:
   permission: armacube.jobs
   permission message: &4Tu n'as pas la permission !
   trigger:
       open chest with 4 rows named "&aMétier" to player
       format slot 0 of player with Light green Wool named "&aGrade Basique" with lore "&aTout Les Grade Neutre" to close then run [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 1 of player with Leather Tunic named "&aCivil" with lore "&aGrade De Debut" to close then run [make player execute command "/commande0"]
       format slot 2 of player with Book named "&cMaire" with lore "&cDeviens Gérant De La Ville" to close then run [make player execute command "/commande1"]
       format slot 9 of player with Blue Wool named "&9Police" with lore "&9Tout Les Grade De La Police" to close then run  [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 10 of player with Chain Helmet named "&1Policier" with lore "&1Premier Grade De La Police" to close then run [make player execute command "/commande2"]
       format slot 18 of player with Yellow Wool named "&eLes Hors La Lois" with lore "&eTout Les Metier Ilégal" to close then run [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 19 of player with Sugar named "&6Rebelle" with lore "&6Enemi de la police" to close then run [make player execute command "/commande3"]
       format slot 27 of player with red Wool named "&4Grade Staff" with lore "&cTout Les Staff" to close then run [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 28 of player with Wooden Sword named "&bModérateur" with lore "&bDeviens Un Grand Modérateur De ArmaCube !" to close then run [send "&7&l[&cArmaJobs&7&l] &bTa Vraiment crue t'allais devenir Modérateur ? =')"]
       format slot 29 of player with Wooden Axe named "&4Admin" with lore "&cDeviens Le Meilleur Admin De France !" to close then run [send "&7&l[&cArmaJobs&7&l] &cTa Vraiment crue t'allais Devenir Admin ? =')"]

command /commande0:
   trigger:
       if {jobs.%player%} is true:
           if {jobs.%player%::*} contains "maire":
               remove "maire" from {jobs.%player%::*}
               remove 1 from {maire.jobs}
           if {jobs.%player%::*} contains "gendarme":
               remove "gendarme" from {jobs.%player%::*}
               remove 1 from {gendarme.jobs}
           if {jobs.%player%::*} contains "rebelle":
               remove "rebelle" from {jobs.%player%::*}
               remove 1 from {rebelle.jobs}
           make player execute command "/manudel %player%"
           send "&7&l[&cArmaJobs&7&l] &eDe Retour Au Chomage ? =O "
           broadcast "&7&l[&cArmaJobs&7&l] &e %Player% Viens de retourner au chomage (civil)"
           delete {jobs.%player%}
command /commande1:
   trigger:
       if {jobs.%player%} is not set:
       if {maire.jobs} is smaller than 8:
               add 1 to {maire.jobs}
               add "maire" to {jobs.%player%::*}
               set {jobs.%player%} to true
               make player execute command "/maire"
               send "&7&l[&cArmaJobs&7&l] &eBonne Chance Au Election"
command /commande2:
   trigger:
       if {jobs.%player%} is not set:
       if {maire.jobs} is smaller than 8:
               add 1 to {gendarme.jobs}
               add "gendarme" to {jobs.%player%::*}
               set {jobs.%player%} to true
               make player execute command "/manuadd %player% gendarme"
               send "&7&l[&cArmaJobs&7&l] &eBienvenue dans la Police %player% "
               broadcast "&7&l[&cArmaJobs&7&l] &e %Player% Viens de rejoindre les forces de L'ordre"
command /commande3:
   trigger:
       if {jobs.%player%} is not set:
       if {rebelle.jobs} is smaller than 8:
               add 1 to {rebelle.jobs}
               add "rebelle" to {jobs.%player%::*}
               set {jobs.%player%} to true
               make player execute command "/manuadd %player% rebelle"
               send "&7&l[&cArmaJobs&7&l] &eBienvenue Du Côter Rebelle %player% ! "
               broadcast "&7&l[&cArmaJobs&7&l] &e %Player% Viens de rejoindre les Rebelles"

Posté(e)

Voilà

des erreurs?

command /jobs:
   permission: armacube.jobs
   permission message: &4Tu n'as pas la permission !
   trigger:
       open chest with 4 rows named "&aMétier" to player
       format slot 0 of player with Light green Wool named "&aGrade Basique" with lore "&aTout Les Grade Neutre" to close then run [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 1 of player with Leather Tunic named "&aCivil" with lore "&aGrade De Debut" to close then run [make player execute command "/commande0"]
       format slot 2 of player with Book named "&cMaire" with lore "&cDeviens Gérant De La Ville" to close then run [make player execute command "/commande1"]
       format slot 9 of player with Blue Wool named "&9Police" with lore "&9Tout Les Grade De La Police" to close then run  [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 10 of player with Chain Helmet named "&1Policier" with lore "&1Premier Grade De La Police" to close then run [make player execute command "/commande2"]
       format slot 18 of player with Yellow Wool named "&eLes Hors La Lois" with lore "&eTout Les Metier Ilégal" to close then run [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 19 of player with Sugar named "&6Rebelle" with lore "&6Enemi de la police" to close then run [make player execute command "/commande3"]
       format slot 27 of player with red Wool named "&4Grade Staff" with lore "&cTout Les Staff" to close then run [send "&7&l[&cArmaJobs&7&l] &eNe Clique Pas Sur Les Laines Choisis toi un metier !"]
       format slot 28 of player with Wooden Sword named "&bModérateur" with lore "&bDeviens Un Grand Modérateur De ArmaCube !" to close then run [send "&7&l[&cArmaJobs&7&l] &bTa Vraiment crue t'allais devenir Modérateur ? =')"]
       format slot 29 of player with Wooden Axe named "&4Admin" with lore "&cDeviens Le Meilleur Admin De France !" to close then run [send "&7&l[&cArmaJobs&7&l] &cTa Vraiment crue t'allais Devenir Admin ? =')"]

command /commande0:
   trigger:
       if {jobs.%player%} is true:
           if {jobs.%player%::*} contains "maire":
               remove "maire" from {jobs.%player%::*}
               remove 1 from {maire.jobs}
           if {jobs.%player%::*} contains "gendarme":
               remove "gendarme" from {jobs.%player%::*}
               remove 1 from {gendarme.jobs}
           if {jobs.%player%::*} contains "rebelle":
               remove "rebelle" from {jobs.%player%::*}
               remove 1 from {rebelle.jobs}
           make player execute command "/manudel %player%"
           send "&7&l[&cArmaJobs&7&l] &eDe Retour Au Chomage ? =O "
           broadcast "&7&l[&cArmaJobs&7&l] &e %Player% Viens de retourner au chomage (civil)"
           delete {jobs.%player%}
command /commande1:
   trigger:
       if {jobs.%player%} is not set:
           if {maire.jobs} is smaller than 8:
               add 1 to {maire.jobs}
               add "maire" to {jobs.%player%::*}
               set {jobs.%player%} to true
               make player execute command "/maire"
               send "&7&l[&cArmaJobs&7&l] &eBonne Chance Au Election"
command /commande2:
   trigger:
       if {jobs.%player%} is not set:
           if {maire.jobs} is smaller than 8:
               add 1 to {gendarme.jobs}
               add "gendarme" to {jobs.%player%::*}
               set {jobs.%player%} to true
               make player execute command "/manuadd %player% gendarme"
               send "&7&l[&cArmaJobs&7&l] &eBienvenue dans la Police %player% "
               broadcast "&7&l[&cArmaJobs&7&l] &e %Player% Viens de rejoindre les forces de L'ordre"
command /commande3:
   trigger:
       if {jobs.%player%} is not set:
           if {rebelle.jobs} is smaller than 8:
               add 1 to {rebelle.jobs}
               add "rebelle" to {jobs.%player%::*}
               set {jobs.%player%} to true
               make player execute command "/manuadd %player% rebelle"
               send "&7&l[&cArmaJobs&7&l] &eBienvenue Du Côter Rebelle %player% ! "
               broadcast "&7&l[&cArmaJobs&7&l] &e %Player% Viens de rejoindre les Rebelles"

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