Solved Parse as offlineplayer?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

KroterPvP

Active Member
Apr 10, 2017
178
7
18
Can I parse a text to be read as offlineplayer? (/command [<text>]) And parse this text as offlineplayer instead of puting [<offlineplayer>].
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
[doublepost=1493638067,1493635509][/doublepost]I've solved it. Thanks
 
Status
Not open for further replies.