Solved How to add arg 1 to your money amount?

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

_ExtraGames_

Member
Apr 3, 2021
11
0
1
22
Hello! Im trying to create a comand that gives the player money. But it's saying arg 1 iant a solid number. How can I fix this?

Code:
 command / mrbeast <number>:
    permission:op
    trigger:
        if arg 1 is a number:
          add %arg-1% to player's balance
           send "&C%arg-1%$ &4 coins has been added to your account!" to player
        else:
           send"&4%arg-1% isn't a solid number. Sorry!"
 
Last edited:
Code:
command /givemoney <integer>:
 trigger:
  add arg-1 to {%player%.money}
  send "money succesfully added" to player

This works for me
 
It let me do it, but dont add the money to the player account
It let me do it, but dont add the money to the player account
Code:
command /givemoney <integer>:
 trigger:
  add arg-1 to {%player%.money}
  send "money succesfully added" to player
 
command /showmoney:
 trigger:
  send "you have %{%player%.money}% money"

Maybe because you don't have any way to show it? Try with this command
 
Code:
command /givemoney <integer>:
 trigger:
  add arg-1 to {%player%.money}
  send "money succesfully added" to player
 
command /showmoney:
 trigger:
  send "you have %{%player%.money}% money"

Maybe because you don't have any way to show it? Try with this command

it worked. ty
 
Status
Not open for further replies.