Need help with balance

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

mrbrennus

Member
Oct 30, 2024
2
0
1
When a person checks the balance, writes that there are not enough funds, but at the same time the player's balance exceeds the required amount, the variable is the balance - I checked, I really need help!

Code:
command /buybussines [<text>]:
    usage: &fИспользование: /buybussines &d(бизнес)
    trigger:
        if arg-1 is "Cafe":
            if {_cafe1.owner} is not set:
                set {player.balance::%uuid of player%} to placeholder "vault_eco_balance"
                send "%{player.balance::%uuid of player%}%" to player
                if {player.balance::%uuid of player%} >= 1500000:
                    execute console command "money take %player% 1500000"
                    execute console command "lp user %player% permission set cafe1.owned"
                    set {_cafe1.owner} to "%player%"
                    send "&a[!] &fВы успешно приобрели Кафетерий №1!" to player
                    execute console command "dh l set Cafe3 1 7 &fСтатус: &aКуплен! "
                    execute console command "dh l set Cafe3 1 6 &fВладелец: &7%player%"
                    broadcast "&9[НОВОСТИ] &fГражданин %player% выкупил бизнес Кафетерий №1!"
                    broadcast "&9[НОВОСТИ] &fПоздравим же его!"
                else:
                    send "&c[!] &fУ вас недостаточно средств для покупки!" to player
            else:
                send "&c[!] &fБизнес уже куплен!" to player