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.

ShopGui+ money save to variable

Discussion in 'Skript' started by MrNygus, Jun 13, 2022.

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

    MrNygus Active Member

    Joined:
    Jan 28, 2017
    Messages:
    116
    Likes Received:
    2
    Hello,
    1.is it possible to save money to global variable when player buy item?
    2.is it possible to stop buy when ex. variable: shopguititems.stone is 0?
    3.is it possible to set price of item in skript?

    thanks <3
     
  2. Zyxed

    Supporter

    Joined:
    May 17, 2021
    Messages:
    23
    Likes Received:
    1
    1. Not sure what you mean
    2. You can just use if check there
    Code (Text):
    1. if {shopItems::stone} > 0:
    2.     #buy it
    3. else:
    4.     send ”all stone is sold out!” to player
    3. You can just set price check after the if check
    Code (Text):
    1. options:
    2.     stonePrice: 10
    3.  
    4. if {money::%uuid of player%} >= {@stonePrice}:
    5.     #buy it
    6. else:
    7.     send ”you need more money!” to player
     
Thread Status:
Not open for further replies.

Share This Page

Loading...