For some reason this is only displaying 0. Even when adding coins. Any help?
Code:
command /money:
aliases: /coins
trigger:
if {ffajoin.%player%} is true:
send message "{@prefix} &7You have &c%{ffacoins.%player%}% &7coins."
else:
send message "{@unknown}"
command /ffacoins [<text>] [<offline player>] [<text>]:
trigger:
if {ffajoin.%player%} is true:
if player has permission "ffa.coins":
if arg-1 is not set:
send message "&8&m-------------------------"
send message "&7[&6FFA&7] &4COINS"
send message ""
send message "&4/ffacoins add {player} {amount} &7- &aGive a player's coins"
send message "&4/ffacoins take {player} {amount} &7- &aTake a player's coins"
send message "&4/ffaadmin reset {player} &7- &aReset a player's coins"
send message ""
send message "&8&m-------------------------"
else if arg-1 is "add":
if arg-2 is not set:
send message "{@prefix} &cIncorrect Usage! &4/ffacoins add {player} {amount}"
if arg-2 is set:
if arg-2 has played on this server before:
if arg-3 is not set:
send message "{@prefix} &cIncorrect Usage! &4/ffacoins add {player} {amount}"
if arg-3 is set:
if (arg-3 parsed as num) is set:
subtract arg-3 from {ffacoins.%arg-2%}
send message "{@prefix} &7Successfully added &c%arg-3% &7to &6%arg-2%'s &7coins!"
else:
send message "{@prefix} &cIncorrect Usage! You must specify a number to add."
if arg-2 has not played before:
send message "{@prefix} &7%arg-2% &chas never connected!"
else if arg-1 is "take":
if arg-2 is not set:
send message "{@prefix} &cIncorrect Usage! &4/ffacoins take {player} {amount}"
if arg-2 is set:
if arg-2 has played on this server before:
if arg-3 is not set:
send message "{@prefix} &cIncorrect Usage! &4/ffacoins take {player} {amount}"
if arg-3 is set:
if (arg-3 parsed as num) is set:
add arg-3 to {ffacoins.%arg-2%}
send message "{@prefix} &7Successfully took &c%arg-3% &7from &6%arg-2%'s coins"
else:
send message "{@prefix} &cIncorrect Usage! You must specify a number to take."
if arg-2 has not played before:
send message "{@prefix} &7%arg-2% &chas never connected!"
else if arg-1 is "reset":
if arg-2 is not set:
send message "{@prefix} &cIncorrect Usage! &4/ffacoins reset {player}"
if arg-2 is set:
if arg-2 has played on this server before:
set {ffacoins.%player%} to 0
send message "{@prefix} &6%arg-2%'s &ccoins have been reset!"
if arg-2 has not played before:
send message "{@prefix} &7%arg-2% &chas never connected!"
else:
send message "{@unknown}"
else:
send message "{@unknown}"
else:
send message "{@unknown}"
Last edited: