Aller au contenu
  • 0

Aide pour des variables


Question

Posté(e)

d /start shop:
   permission: op
   trigger:
       set {2} to 2
       set {4} to 4
       set {8} to 8
       set {16} to 16
       set {34} to 34
       set {48} to 48
       set {56} to 56
       set {64} to 64
command /diamond2:
   permission: op
   trigger:
       set {_75} to 75
       set {_*2} to ({2}*{_75})
       set {_*4} to ({4}*{_75})
       set {_*8} to ({8}*{_75})
       set {_*16} to ({16}*{_75})
       set {_*34} to ({32}*{_75})
       set {_*48} to ({48}*{_75})
       set {_*56} to ({56}*{_75})
       set {_*64} to ({64}*{_75})
       wait 1 ticks
       open chest with 1 rows named "&bDiamant &7: &e&lvente" to player
       wait 1 tick
       format slot 0 of player with a diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &81 || &8&lPrix de vente &7: &8%{_75}%$ " to run [run player command "sell1diamond" as op]
       wait 1 ticks
       format slot 1 of player with 2 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &82 || &8&lPrix de vente &7: &8%{_*2}%$ " to run [run player command "sell2diamond" as op]
       wait 1 ticks
       format slot 2 of player with 4 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &84 || &8&lPrix de vente &7: &8%{_*4}%$ " to run [run player command "sell4diamond" as op]
       wait 1 ticks
       format slot 3 of player with 8 diamond named "&bDiamant &7: &e&8lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &88 || &8&lPrix de vente &7: &8%{_*8}%$ " to run [run player command "sell8diamond" as op]
       wait 1 ticks
       format slot 4 of player with 16 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &816 || &8&lPrix de vente &7: &8%{_*16}%$ " to run [run player command "sell16diamond" as op]
       wait 1 ticks
       format slot 5 of player with 34 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &834 || &8&lPrix de vente &7: &8%{_*34}%$ " to run [run player command "sell34diamond" as op]
       wait 1 ticks
       format slot 6 of player with 48 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &848 || &8&lPrix de vente &7: &8%{_*48}%$ " to run [run player command "sell48diamond" as op]
       wait 1 ticks
       format slot 7 of player with 56 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &856 || &8&lPrix de vente &7: &8%{_*56}%$ " to run [run player command "sell56diamond" as op]
       wait 1 ticks
       format slot 8 of player with 64 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &864 || &8&lPrix de vente &7: &8%{_*64}%$ " to run [run player command "sell64diamond" as op]

Bonjour je cherche l'erreur dans mon code ca serait compliquer de vous expliquer donc je vous donne la partie du code

10 réponses à cette question

Messages recommandés

  • 0
Posté(e)
Je pense qu'il a pas copié tout le code et que c'est pour ca qu'on a que le d de command, mais bon

je n'avais tous copié sorry =) mais se n'est pas ca la faute

  • 0
Posté(e)

Bon bah j'ai testé ton code, les deux erreurs que tu avais faites étaient juste des erreurs de syntaxe. A savoir :

- Skript ne prend pas en compte les noms de variable avec un ' * ' dedans.

- [run player command "/selldiamond" as op] >>>> [make player execute command "/selldiamond"] Et pour éviter que le joueur ai des problèmes, tu ne mets pas de permission à ta commande /selldiamond.

 

D'autre part, si j'ai bien compris là où tu veux en venir tu étais en train de réaliser 9 commandes différentes au lieu d'une seule. Donc pour te faciliter la vie je te donne le code que tu aurais du mettre.

 

Voici le code que tu nous as donné corrigé :

 

command /start shop:
   permission: op
   trigger:
       set {2} to 2
       set {4} to 4
       set {8} to 8
       set {16} to 16
       set {34} to 34
       set {48} to 48
       set {56} to 56
       set {64} to 64

command /diamond2:
   permission: op
   trigger:
       set {_75} to 75
       set {_2} to ({2}*{_75})
       set {_4} to ({4}*{_75})
       set {_8} to ({8}*{_75})
       set {_16} to ({16}*{_75})
       set {_34} to ({32}*{_75})
       set {_48} to ({48}*{_75})
       set {_56} to ({56}*{_75})
       set {_64} to ({64}*{_75})
       wait 1 ticks
       open chest with 1 rows named "&bDiamant &7: &e&lvente" to player
       wait 1 tick
       format slot 0 of player with a diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &81 || &8&lPrix de vente &7: &8%{_75}%$$ " to run [make player execute command "/sell1diamond"]
       wait 1 ticks
       format slot 1 of player with 2 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &82 || &8&lPrix de vente &7: &8%{_2}%$ " to run [make player execute command "/sell2diamond"]
       wait 1 ticks
       format slot 2 of player with 4 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &84 || &8&lPrix de vente &7: &8%{_4}%$ " to run [make player execute command  "sell4diamond"]
       wait 1 ticks
       format slot 3 of player with 8 diamond named "&bDiamant &7: &e&8lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &88 || &8&lPrix de vente &7: &8%{_8}%$ " to run [make player execute command  "sell8diamond"]
       wait 1 ticks
       format slot 4 of player with 16 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &816 || &8&lPrix de vente &7: &8%{_16}%$ " to run [make player execute command  "sell16diamond"]
       wait 1 ticks
       format slot 5 of player with 34 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &834 || &8&lPrix de vente &7: &8%{_34}%$ " to run [make player execute command  "sell34diamond"]
       wait 1 ticks
       format slot 6 of player with 48 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &848 || &8&lPrix de vente &7: &8%{_48}%$ " to run [make player execute command  "sell48diamond"]
       wait 1 ticks
       format slot 7 of player with 56 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &856 || &8&lPrix de vente &7: &8%{_56}%$ " to run [make player execute command  "sell56diamond"]
       wait 1 ticks
       format slot 8 of player with 64 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &864 || &8&lPrix de vente &7: &8%{_64}%$ " to run [make player execute command  "sell64diamond"]

 

Et donc au lieu de mettre des commandes comme "/sell1diamond" ou encore "/sell64diamond" ce qui t'obliges à faire autant de commandes que d'objets dans ton inventaire, tu devrais faire comme ça :

 

Pour la vente d'un diamant par exemple :

[make console execute command "/selldiamond 1 %player%"]

Avec une commande à arguments :

command /selldiamond <number> <player>:

 

Je t'ai fait le code tout entier, le voici :

 

command /start shop:
   permission: op
   trigger:
       set {2} to 2
       set {4} to 4
       set {8} to 8
       set {16} to 16
       set {34} to 34
       set {48} to 48
       set {56} to 56
       set {64} to 64

command /diamond2:
   permission: op
   trigger:
       set {_75} to 75
       set {_2} to ({2}*{_75})
       set {_4} to ({4}*{_75})
       set {_8} to ({8}*{_75})
       set {_16} to ({16}*{_75})
       set {_34} to ({32}*{_75})
       set {_48} to ({48}*{_75})
       set {_56} to ({56}*{_75})
       set {_64} to ({64}*{_75})

       wait 1 ticks
       open chest with 1 rows named "&bDiamant &7: &e&lvente" to player
       wait 1 tick
       format slot 0 of player with a diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &81 || &8&lPrix de vente &7: &8%{_75}%$$ " to run [make console execute command "/selldiamond 1 %player%"]
       wait 1 ticks
       format slot 1 of player with 2 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &82 || &8&lPrix de vente &7: &8%{_2}%$ " to run [make console execute command "/selldiamond 2 %player%"]
       wait 1 ticks
       format slot 2 of player with 4 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &84 || &8&lPrix de vente &7: &8%{_4}%$ " to run [make console execute command "selldiamond 4 %player%"]
       wait 1 ticks
       format slot 3 of player with 8 diamond named "&bDiamant &7: &e&8lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &88 || &8&lPrix de vente &7: &8%{_8}%$ " to run [make console execute command "selldiamond 8 %player%"]
       wait 1 ticks
       format slot 4 of player with 16 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &816 || &8&lPrix de vente &7: &8%{_16}%$ " to run [make console execute command "selldiamond 16 %player%"]
       wait 1 ticks
       format slot 5 of player with 34 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &834 || &8&lPrix de vente &7: &8%{_34}%$ " to run [make console execute command "selldiamond 34 %player%"]
       wait 1 ticks
       format slot 6 of player with 48 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &848 || &8&lPrix de vente &7: &8%{_48}%$ " to run [make console execute command "selldiamond 48 %player%"]
       wait 1 ticks
       format slot 7 of player with 56 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &856 || &8&lPrix de vente &7: &8%{_56}%$ " to run [make console execute command "selldiamond 56 %player%"]
       wait 1 ticks
       format slot 8 of player with 64 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &864 || &8&lPrix de vente &7: &8%{_64}%$ " to run [make console execute command "selldiamond 64 %player%"]


command /selldiamond <number> <player>:
   trigger:
       if arg 1 is 1:
           if arg 2 don't have 1 diamond:
               message "&c[Erreur] : Vous n'avez pas suffisamment de &3Diamant &cpour effectuer cette action." to arg 2
           else:
               remove 1 diamond from the inventory of arg 2
               message "&3[sell] : &7Votre vente s'est effectuée avec &2succès &7!" to arg 2

       if arg 1 is 2:
           if arg 2 don't have 2 diamond:
               message "&c[Erreur] : Vous n'avez pas suffisamment de &3Diamant &cpour effectuer cette action." to arg 2
           else:
               remove 2 diamond from the inventory of arg 2
               message "&3[sell] : &7Votre vente s'est effectuée avec &2succès &7!" to arg 2

       if arg 1 is 4:
           if arg 2 don't have 4 diamond:
               message "&c[Erreur] : Vous n'avez pas suffisamment de &3Diamant &cpour effectuer cette action." to arg 2
           else:
               remove 4 diamond from the inventory of arg 2
               message "&3[sell] : &7Votre vente s'est effectuée avec &2succès &7!" to arg 2

       if arg 1 is 8:
           if arg 2 don't have 8 diamond:
               message "&c[Erreur] : Vous n'avez pas suffisamment de &3Diamant &cpour effectuer cette action." to arg 2
           else:
               remove 8 diamond from the inventory of arg 2
               message "&3[sell] : &7Votre vente s'est effectuée avec &2succès &7!" to arg 2

       if arg 1 is 16:         
           if arg 2 don't have 16 diamond:
               message "&c[Erreur] : Vous n'avez pas suffisamment de &3Diamant &cpour effectuer cette action." to arg 2
           else:
               remove 16 diamond from the inventory of arg 2
               message "&3[sell] : &7Votre vente s'est effectuée avec &2succès &7!" to arg 2

       if arg 1 is 34:
           if arg 2 don't have 34 diamond:
               message "&c[Erreur] : Vous n'avez pas suffisamment de &3Diamant &cpour effectuer cette action." to arg 2
           else:
               remove 34 diamond from the inventory of arg 2
               message "&3[sell] : &7Votre vente s'est effectuée avec &2succès &7!" to arg 2

       if arg 1 is 48:
           if arg 2 don't have 48 diamond:
               message "&c[Erreur] : Vous n'avez pas suffisamment de &3Diamant &cpour effectuer cette action." to arg 2
           else:
               remove 48 diamond from the inventory of arg 2
               message "&3[sell] : &7Votre vente s'est effectuée avec &2succès &7!" to arg 2

       if arg 1 is 54:
           if arg 2 don't have 54 diamond:
               message "&c[Erreur] : Vous n'avez pas suffisamment de &3Diamant &cpour effectuer cette action." to arg 2
           else:
               remove 54 diamond from the inventory of arg 2
               message "&3[sell] : &7Votre vente s'est effectuée avec &2succès &7!" to arg 2

       if arg 1 is 64:
           if arg 2 don't have 64 diamond:
               message "&c[Erreur] : Vous n'avez pas suffisamment de &3Diamant &cpour effectuer cette action." to arg 2
           else:
               remove 64 diamond from the inventory of arg 2
               message "&3[sell] : &7Votre vente s'est effectuée avec &2succès &7!" to arg 2

  • J'aime 2
  • 0
Posté(e)
Bon bah j'ai testé ton code, les deux erreurs que tu avais faites étaient juste des erreurs de syntaxe. A savoir :

- Skript ne prend pas en compte les noms de variable avec un ' * ' dedans.

- [run player command "/selldiamond" as op] >>>> [make player execute command "/selldiamond"] Et pour éviter que le joueur ai des problèmes, tu ne mets pas de permission à ta commande /selldiamond.

 

D'autre part, si j'ai bien compris là où tu veux en venir tu étais en train de réaliser 9 commandes différentes au lieu d'une seule. Donc pour te faciliter la vie je te donne le code que tu aurais du mettre.

 

Voici le code que tu nous as donné corrigé :

 

command /start shop:
   permission: op
   trigger:
       set {2} to 2
       set {4} to 4
       set {8} to 8
       set {16} to 16
       set {34} to 34
       set {48} to 48
       set {56} to 56
       set {64} to 64

command /diamond2:
   permission: op
   trigger:
       set {_75} to 75
       set {_2} to ({2}*{_75})
       set {_4} to ({4}*{_75})
       set {_8} to ({8}*{_75})
       set {_16} to ({16}*{_75})
       set {_34} to ({32}*{_75})
       set {_48} to ({48}*{_75})
       set {_56} to ({56}*{_75})
       set {_64} to ({64}*{_75})
       wait 1 ticks
       open chest with 1 rows named "&bDiamant &7: &e&lvente" to player
       wait 1 tick
       format slot 0 of player with a diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &81 || &8&lPrix de vente &7: &8%{_75}%$$ " to run [make player execute command "/sell1diamond"]
       wait 1 ticks
       format slot 1 of player with 2 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &82 || &8&lPrix de vente &7: &8%{_2}%$ " to run [make player execute command "/sell2diamond"]
       wait 1 ticks
       format slot 2 of player with 4 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &84 || &8&lPrix de vente &7: &8%{_4}%$ " to run [make player execute command  "sell4diamond"]
       wait 1 ticks
       format slot 3 of player with 8 diamond named "&bDiamant &7: &e&8lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &88 || &8&lPrix de vente &7: &8%{_8}%$ " to run [make player execute command  "sell8diamond"]
       wait 1 ticks
       format slot 4 of player with 16 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &816 || &8&lPrix de vente &7: &8%{_16}%$ " to run [make player execute command  "sell16diamond"]
       wait 1 ticks
       format slot 5 of player with 34 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &834 || &8&lPrix de vente &7: &8%{_34}%$ " to run [make player execute command  "sell34diamond"]
       wait 1 ticks
       format slot 6 of player with 48 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &848 || &8&lPrix de vente &7: &8%{_48}%$ " to run [make player execute command  "sell48diamond"]
       wait 1 ticks
       format slot 7 of player with 56 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &856 || &8&lPrix de vente &7: &8%{_56}%$ " to run [make player execute command  "sell56diamond"]
       wait 1 ticks
       format slot 8 of player with 64 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &864 || &8&lPrix de vente &7: &8%{_64}%$ " to run [make player execute command  "sell64diamond"]

 

Et donc au lieu de mettre des commandes comme "/sell1diamond" ou encore "/sell64diamond" ce qui t'obliges à faire autant de commandes que d'objets dans ton inventaire, tu devrais faire comme ça :

 

Pour la vente d'un diamant par exemple :

[make console execute command "/selldiamond 1 %player%"]

Avec une commande à arguments :

command /selldiamond <number> <player>:

 

Je t'ai fait le code tout entier, le voici :

 

command /start shop:
   permission: op
   trigger:
       set {2} to 2
       set {4} to 4
       set {8} to 8
       set {16} to 16
       set {34} to 34
       set {48} to 48
       set {56} to 56
       set {64} to 64

command /diamond2:
   permission: op
   trigger:
       set {_75} to 75
       set {_2} to ({2}*{_75})
       set {_4} to ({4}*{_75})
       set {_8} to ({8}*{_75})
       set {_16} to ({16}*{_75})
       set {_34} to ({32}*{_75})
       set {_48} to ({48}*{_75})
       set {_56} to ({56}*{_75})
       set {_64} to ({64}*{_75})

       wait 1 ticks
       open chest with 1 rows named "&bDiamant &7: &e&lvente" to player
       wait 1 tick
       format slot 0 of player with a diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &81 || &8&lPrix de vente &7: &8%{_75}%$$ " to run [make console execute command "/selldiamond 1 %player%"]
       wait 1 ticks
       format slot 1 of player with 2 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &82 || &8&lPrix de vente &7: &8%{_2}%$ " to run [make console execute command "/selldiamond 2 %player%"]
       wait 1 ticks
       format slot 2 of player with 4 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &84 || &8&lPrix de vente &7: &8%{_4}%$ " to run [make console execute command "selldiamond 4 %player%"]
       wait 1 ticks
       format slot 3 of player with 8 diamond named "&bDiamant &7: &e&8lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &88 || &8&lPrix de vente &7: &8%{_8}%$ " to run [make console execute command "selldiamond 8 %player%"]
       wait 1 ticks
       format slot 4 of player with 16 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &816 || &8&lPrix de vente &7: &8%{_16}%$ " to run [make console execute command "selldiamond 16 %player%"]
       wait 1 ticks
       format slot 5 of player with 34 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &834 || &8&lPrix de vente &7: &8%{_34}%$ " to run [make console execute command "selldiamond 34 %player%"]
       wait 1 ticks
       format slot 6 of player with 48 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &848 || &8&lPrix de vente &7: &8%{_48}%$ " to run [make console execute command "selldiamond 48 %player%"]
       wait 1 ticks
       format slot 7 of player with 56 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &856 || &8&lPrix de vente &7: &8%{_56}%$ " to run [make console execute command "selldiamond 56 %player%"]
       wait 1 ticks
       format slot 8 of player with 64 diamond named "&bDiamant &7: &e&lvente" with lore "&b&lDescription : || &8&lQuantitée &7: &864 || &8&lPrix de vente &7: &8%{_64}%$ " to run [make console execute command "selldiamond 64 %player%"]


command /selldiamond <number> <player>:
   trigger:
       if arg 1 is 1:
           if arg 2 don't have 1 diamond:
               message "&c[Erreur] : Vous n'avez pas suffisamment de &3Diamant &cpour effectuer cette action." to arg 2
           else:
               remove 1 diamond from the inventory of arg 2
               message "&3[sell] : &7Votre vente s'est effectuée avec &2succès &7!" to arg 2

       if arg 1 is 2:
           if arg 2 don't have 2 diamond:
               message "&c[Erreur] : Vous n'avez pas suffisamment de &3Diamant &cpour effectuer cette action." to arg 2
           else:
               remove 2 diamond from the inventory of arg 2
               message "&3[sell] : &7Votre vente s'est effectuée avec &2succès &7!" to arg 2

       if arg 1 is 4:
           if arg 2 don't have 4 diamond:
               message "&c[Erreur] : Vous n'avez pas suffisamment de &3Diamant &cpour effectuer cette action." to arg 2
           else:
               remove 4 diamond from the inventory of arg 2
               message "&3[sell] : &7Votre vente s'est effectuée avec &2succès &7!" to arg 2

       if arg 1 is 8:
           if arg 2 don't have 8 diamond:
               message "&c[Erreur] : Vous n'avez pas suffisamment de &3Diamant &cpour effectuer cette action." to arg 2
           else:
               remove 8 diamond from the inventory of arg 2
               message "&3[sell] : &7Votre vente s'est effectuée avec &2succès &7!" to arg 2

       if arg 1 is 16:        
           if arg 2 don't have 16 diamond:
               message "&c[Erreur] : Vous n'avez pas suffisamment de &3Diamant &cpour effectuer cette action." to arg 2
           else:
               remove 16 diamond from the inventory of arg 2
               message "&3[sell] : &7Votre vente s'est effectuée avec &2succès &7!" to arg 2

       if arg 1 is 34:
           if arg 2 don't have 34 diamond:
               message "&c[Erreur] : Vous n'avez pas suffisamment de &3Diamant &cpour effectuer cette action." to arg 2
           else:
               remove 34 diamond from the inventory of arg 2
               message "&3[sell] : &7Votre vente s'est effectuée avec &2succès &7!" to arg 2

       if arg 1 is 48:
           if arg 2 don't have 48 diamond:
               message "&c[Erreur] : Vous n'avez pas suffisamment de &3Diamant &cpour effectuer cette action." to arg 2
           else:
               remove 48 diamond from the inventory of arg 2
               message "&3[sell] : &7Votre vente s'est effectuée avec &2succès &7!" to arg 2

       if arg 1 is 54:
           if arg 2 don't have 54 diamond:
               message "&c[Erreur] : Vous n'avez pas suffisamment de &3Diamant &cpour effectuer cette action." to arg 2
           else:
               remove 54 diamond from the inventory of arg 2
               message "&3[sell] : &7Votre vente s'est effectuée avec &2succès &7!" to arg 2

       if arg 1 is 64:
           if arg 2 don't have 64 diamond:
               message "&c[Erreur] : Vous n'avez pas suffisamment de &3Diamant &cpour effectuer cette action." to arg 2
           else:
               remove 64 diamond from the inventory of arg 2
               message "&3[sell] : &7Votre vente s'est effectuée avec &2succès &7!" to arg 2

Merci de ton aide tous marche sauf encore un truc c'est pour que le joueur puisse avoir de l'argent.. Merci

  • 0
Posté(e)

Oui, en effet je n'ai pas rajouté de gain d'argent parce que je ne savais pas comment tu fonctionnais... et quelle commande était utilisée sur ton serveur pour qu'un joueur gagne de l'argent.

 

Donne moi cette commande et je te rajoute tout ça !

  • 0
Posté(e)
Oui, en effet je n'ai pas rajouté de gain d'argent parce que je ne savais pas comment tu fonctionnais... et quelle commande était utilisée sur ton serveur pour qu'un joueur gagne de l'argent.

 

Donne moi cette commande et je te rajoute tout ça !

Non pas de problème j'ai trouvé un solution =)

        if arg 1 is 1:
           if arg 2 don't have 1 diamond:
               message "&c[Erreur] : Vous n'avez pas suffisamment de &3Diamant &cpour effectuer cette action." to arg 2
           else:
               remove 1 diamond from the inventory of arg 2
               message "&3[sell] : &7Votre vente s'est effectuée avec &2succès &7!" to arg 2
               make console execute command "eco give %arg 2% %{_75}%"

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