• 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 comminuty!

    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.

EARTHIIAN

Member
Oct 26, 2021
2
0
1
24
ive been trying forever, my command isnt working from 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:
I don't get what you want, and I would not recommend making a money system with skript because it isn't compatible with anything else like vault
 
Status
Not open for further replies.