Solved Add 10 to player's money for every cow in {cows}

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

Goose

Supporter
Nov 23, 2019
439
33
28
Hey all! I need help with adding 10 dollars to the player's balance for every 1 cow in {cows} ({cows} is a variable with an integer set). How would I do this? For example, if {cows} is set to 1, the player gets $10 every minute, if {cows} is set to 2, the player gets $20 every minute, etc. I can do "every 1 minute: if {cows} is set to 1: add 10 to player's money" but that seems inefficient.
 
Hey all! I need help with adding 10 dollars to the player's balance for every 1 cow in {cows} ({cows} is a variable with an integer set). How would I do this? For example, if {cows} is set to 1, the player gets $10 every minute, if {cows} is set to 2, the player gets $20 every minute, etc. I can do "every 1 minute: if {cows} is set to 1: add 10 to player's money" but that seems inefficient.
You can use `{cows} * 10` for the amount of money to add. Also, you can't use `player` in the `every 1 minute` trigger, since there is no player there. You should loop all players, and use loop-player instead.
 
You can use `{cows} * 10` for the amount of money to add. Also, you can't use `player` in the `every 1 minute` trigger, since there is no player there. You should loop all players, and use loop-player instead.
Wow, thank you so much! Thanks for answering so quickly and giving me advice on how to do this. Thanks again!
 
Status
Not open for further replies.