Aller au contenu
  • 0

[HELP] Mon code de pvp / duel / team ne marche pas


Question

Posté(e)

Bonsoir,

Je suis débutant sur skript et je viens de trouver un code de team pvp mais.... ll ne marche pas.

Pourtant, j'ai verifié, il ne comporte pas d'erreurs au niveau des commandes donc je ne pense pas que ça soit cela qui bloque.

Simplement, lorsque j'exécute une commande ( exemple: /teampvp create ) rien ne se passe.

J'ai besoin d'aide car je vais bientôt ouvrir mon serveur pvp et j'aimerai faire du team pvp

Un petit bout de code :

options:
   T: &cTeam Match Queue
   Q: blaze powder #Item to leave queue
   QN: &8Leave Queue #Name of item to leave queue
   EC: true #Ender Pearl Cooldown (True or False)
   ECT: 15 #Ender Pearl Cooldown Time Seconds
   S: 3 #Time to start the duel Seconds
   C: 7

command /teampvp <text> [<player>]:
   permission: duelteam.teams
   permission message: &cYou don't have permission for that.
   trigger:

       if arg-1 is "create":

           if {duel.%player%.ingame} is true:

               message "&7You cannot do that if you are in a duel."
               stop


           if {duel.%player%.ingame} is false:

               if {intour.%player%.true} is true:
                   message "&7You cannot do that if you are in a tournament!"
                   stop

               else:

                   if {PlayerInTeam::%player%} is set:
                       message "&7You are already in a team."
                       stop

                   if {PlayerInTeam::%player%} is not set:

                       if {PlayerLeaders::%player%} is set:
                           message "&7You can only create 1 team."
                           stop

                       if {PlayerLeaders::%player%} is not set:


                           loop {dueltype::*}:
                               remove player from {match.%loop-value%::*}               
                           set {PlayerLeaders::%player%} to player
                           set {PlayerInTeam::%player%} to player
                           set {PlayerTeam.%player%::%player%} to player
                           set {InTeam.%player%::%player%} to player
                           message "&7Succesfully Created team for PvP!"           
                           stop

       if arg-1 is "invite":

           if {duelteam.%player%.ingame} is true:

               message "&7You cannot do that if are in a duel."
               stop

           if {duelteam.%player%.ingame} is false:

               if {PlayerLeaders::%player%} is not set:
                   message "&7You haven't created any teams."
                   stop

               if {PlayerLeaders::%player%} is set:

                   if arg-2 is not set:

                       message "&7You need to specify the player you want to invite."
                       stop

                   if arg-2 is set:

                       set {_player} to arg-2

                       if {_player} = player:

                           message "&7You cannot invite yourself."
                           stop

                       else:

                           if {PlayerInTeam::%{_player}%} is not set:

                               if {_player} is online:

                                   message "&7You have been invited to join &b%player%'s &7team." to {_player}
                                   delete {PlayerInvite.%player%::%{_player}%}
                                   set {PlayerInvite.%player%::%{_player}%} to {_player}
                                   message "&7You invited &b%{_player}% &7to your team." to player
                                   stop


                           if {PlayerInTeam::%{_player}%} is set:

                               message "&7That player is already in a team."
                               stop



       if arg-1 is "join":

           if {duel.%player%.ingame} is true:

               message "&7You cannot do that if you are in a duel."
               stop

           if {duel.%player%.ingame} is false:

               if {intour.%player%.true} is true:
                   message "&7You cannot do that if you are in a tournament!"
                   stop

               else:

                   if arg-2 is not set:

                       message "&7You need to specify which player's team."
                       stop

                   if arg-2 is set:

                       if {PlayerInTeam::%player%} is set:
                           message "&7You are already in a team."
                           stop

                       if {PlayerInTeam::%player%} is not set:

                           set {_player} to arg-2

                           if {PlayerLeaders::%{_player}%} is not set:

                               message "&7That player doesn't own a team."
                               stop

                           if {PlayerLeaders::%{_player}%} is set:

                               if {PlayerInvite.%{_player}%::%player%} is set:

                                   set {PlayerInTeam::%player%} to player
                                   set {PlayerTeam.%{_player}%::%player%} to player
                                   set {InTeam.%player%::%{_player}%} to {_player}
                                   message "&7You joined &b%{_player}% &7team!." to player
                                   message "&b%player% &7joined your team!." to {_player}
                                   stop

                               else:

                                   message "&7You don't have an invitation for that player's team."
                                   stop

       if arg-1 is "leave":

           if {duelteam.%player%.ingame} is true:

               message "&7You cannot do that if are in a duel."
               stop

           if {duelteam.%player%.ingame} is false:

               if {PlayerInTeam::%player%} is not set:
                   message "&7You are not in a team."
                   stop

               if {PlayerInTeam::%player%} is set:

                   if {PlayerLeaders::%player%} is set:

                       message "&7You need to delete your team."
                       stop

                   if {PlayerLeaders::%player%} is not set:

                       delete {PlayerInTeam::%player%}
                       loop {InTeam.%player%::*}:
                           set {_player} to loop-value
                       clear {InTeam.%player%::*}
                       delete {PlayerTeam.%{_player}%::%player%}
                       message "&7You left &b%{_player}%'s &7team."
                       stop

       if arg-1 is "delete":

           if {duelteam.%player%.ingame} is true:

               message "&7You cannot do that if are in a duel."
               stop

           if {duelteam.%player%.ingame} is false:

               if {PlayerInTeam::%player%} is not set:
                   message "&7You are not in a team."
                   stop

               if {PlayerInTeam::%player%} is set:

                   if {PlayerLeaders::%player%} is not set:

                       message "&7You don't own a team."
                       stop

                   if {PlayerLeaders::%player%} is set:

                       loop {dueltype::*}:
                           remove player from {matchteam.%loop-value%::*}   
                       delete {PlayerInvite.%player%::*}
                       delete {PlayerLeaders::%player%}
                       loop {PlayerTeam.%player%::*}:
                           set {_player} to loop-value
                           clear {InTeam.%{_player}%::*}
                           delete {PlayerInTeam::%{_player}%}
                           message "&7Your team was deleted." to {_player}
                       clear {PlayerTeam.%player%::*}
                       stop

       if arg-1 is "list":

           open chest with 3 rows named "&cTeams" to player
           wait 1 tick
           set {_size} to size of {PlayerLeaders::*}
           set {_slat} to 0
           loop {PlayerLeaders::*}:
               set {_leader} to loop-value
               set {slot.%{_slat}%::%{_leader}%} to {_leader}
               format slot {_slat} of player with skull of {_leader} named "&b%{_leader}%'s Team" with lore "&7%{PlayerTeam.%{_leader}%::*}%" to be unstealable
               add 1 to {_slat}

1 réponse à cette question

Messages recommandés

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