1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved How to add arg 1 to your money amount?

Discussion in 'Skript' started by _ExtraGames_, Apr 3, 2021.

Thread Status:
Not open for further replies.
  1. _ExtraGames_

    _ExtraGames_ Member

    Joined:
    Apr 3, 2021
    Messages:
    11
    Likes Received:
    0
    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 (Text):
    1.  command / mrbeast <number>:
    2.     permission:op
    3.     trigger:
    4.         if arg 1 is a number:
    5.           add %arg-1% to player's balance
    6.            send "&C%arg-1%$ &4 coins has been added to your account!" to player
    7.         else:
    8.            send"&4%arg-1% isn't a solid number. Sorry!"
     
    #1 _ExtraGames_, Apr 3, 2021
    Last edited: Apr 4, 2021
  2. Mattia

    Mattia Member

    Joined:
    Apr 4, 2021
    Messages:
    28
    Likes Received:
    1
    Code (Text):
    1. command /givemoney <integer>:
    2.  trigger:
    3.   add arg-1 to {%player%.money}
    4.   send "money succesfully added" to player
    This works for me
     
  3. _ExtraGames_

    _ExtraGames_ Member

    Joined:
    Apr 3, 2021
    Messages:
    11
    Likes Received:
    0
    It let me do it, but dont add the money to the player account
     
  4. Mattia

    Mattia Member

    Joined:
    Apr 4, 2021
    Messages:
    28
    Likes Received:
    1
    Code (Text):
    1. command /givemoney <integer>:
    2.  trigger:
    3.   add arg-1 to {%player%.money}
    4.   send "money succesfully added" to player
    5.  
    6. command /showmoney:
    7.  trigger:
    8.   send "you have %{%player%.money}% money"
    Maybe because you don't have any way to show it? Try with this command
     
  5. _ExtraGames_

    _ExtraGames_ Member

    Joined:
    Apr 3, 2021
    Messages:
    11
    Likes Received:
    0
    it worked. ty
     
Thread Status:
Not open for further replies.

Share This Page

Loading...