Can I parse a text to be read as offlineplayer? (/command [<text>]) And parse this text as offlineplayer instead of puting [<offlineplayer>].
[doublepost=1493638067,1493635509][/doublepost]I've solved it. Thanks
code_language.skript:
command /supereconomy [<text>] [<text>] [<offlineplayer>] [<text>]:
trigger:
if arg 1 is "bal" or "balance":
if arg 2 is not set:
if {seco.bal.%player%} is not set:
set {seco.bal.%player%} to 0
player has permission "seco.balance":
send "&7You have &a%{seco.bal.%player%}% &7coins."
if arg 2 is set:
if arg 2 is "withdraw":
if arg 3 is not set:
send "&7You must use &a/seco bal withdraw <quantity>&7."
if arg 3 is set:
# I NEED HELP WITH THIS PART: I need to read arg 3 as text, but I still need to have this 3rd argument like [<offlineplayer>] in the command, couse other parts of the skrip need it.
set {_text} to arg 3 parsed as integer
if {text} = 0:
send "&7You can't withdraw that amount of coins!"
stop
if {_text} < 0:
send "&7You can't withdraw that amount of coins!"
stop
if {_text} > 0:
if {seco.bal.%player%} < {_text}:
send "&7You can't withdraw that amount of coins!"
stop
if {seco.bal.%player%} > {_text}:
if player has enough space for 1 175:
remove {_text} from {seco.bal.%player%}
give player 1 175 named "%{_coin}%" with lore "||&7This is a phisical coin withdrawed by &a%player%&7.||&7To claim this &a%{_coin}% &7coin(s), rightclick it."
send "&7You have withdrawed &a%{_text}% &7coin(s) from your balance."
stop
else if player doesn't have enough space for 1 175:
send "&7You don't have space in your inventory to withdraw!"
stop