Players balance is more than 0

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

KorixCZ

New Member
Jun 29, 2021
5
0
1
29
Hello, I need advice. I'm trying to make a player whose economy I have defined. However, there is a smaller catch and the fact that I want to ensure that my custom economy can not add balance to the minus. So I want to find out if the player who uses the order has more than 0 on the account. I use vault + essentials as an economy. But with this code that I have, it shows me an internal error error .. The script itself reloads it for me without a problem. Thanks for the help

CODE -


command /faction [<offlineplayer>] [<int>]:
trigger:
if arg 1 is "Farmas":
if arg 2 > 0:
loop all players:
if player's balance is more than 0:
add arg 2 to {balfarmaa.%arg 1%}
send "set %arg 2% to %arg 1%, Balance - %{balfarmaa.%arg 1%}%"
make console execute command "eco take %player% %arg-2%"

OR pastebin -
https://pastebin.com/q1vcJcAu

Thanks for help me <3.
 
So you want to take money from the player(arg-1) and it should not go into negative, or I'm not sure, sorry?
Btw. you can replace the "eco take" thing with "remove xx from player's balance"
 
Status
Not open for further replies.