ive been trying forever, my command isnt working from console
here is the code (you can ignore the /balance):
there is no error message for adding money because its one of the things I tried to make this command work in console.
here is the code (you can ignore the /balance):
Code:
command /balance [<player>]:
aliases: /bal, /coins
trigger:
if {balance::%player%} is not set:
set {balance::%player%} to 0
if arg 1 is not set:
message "&fYour current &cbalance is &a%{balance::%player%}%.00 &2Dollar(s)."
else:
message "&f%arg 1%'s current &cbalance is &a%{balance::%arg 1%}%.00 &2Dollar(s)."
command /money <text> <player> <number>:
executable by: console and player
trigger:
if arg 1 is "pay":
arg 2 is set
arg 3 is set
if {balance::%player%} is greater than or equal to arg 3:
if arg 3 is greater than 0:
subtract arg 3 from {balance::%player%}
add arg 3 to {balance::%arg 2%}
message "&4You paid %arg 2% &a%arg 3%.00 &2Dollar(s)"
message "&2You recieved %arg 3%.00 &2Dollar(s) from %player%." to arg 2
else:
message "&c&lERROR&r &4You cannot pay some less than 1 dollar!"
else:
message "&c&lERROR&r &4You do not have enough money to do that!"
else if arg 1 is "add":
if player is op:
if arg 3 is greater than 0:
add arg 3 to {balance::%arg 2%}
message "you gave %arg 3%.00 Dollar(s) to %arg 2%."
message "&l&7[&2+&7] &8%arg 3%.00 Dollar(s)" to arg 2
else if arg 1 is "remove":
if player is op:
if arg 3 is greater than 0:
if arg 3 is less than or equal to {balance::%arg 2%}:
subtract arg 3 from {balance::%arg 2%}
message "You removed %arg 3%.00 dollar from %arg 2%"
message "&7[&4-&7] &8%arg 3%.00 Dollar (s)"
else:
message "&c&lERROR&r &4You cannot remove more money than the account has!"
else:
message "&c&lERROR&r &4You cannot remove a value than 1 dollar!"
there is no error message for adding money because its one of the things I tried to make this command work in console.
Last edited: