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 our 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 Why is it not working?

Discussion in 'Skript' started by PantherBoy, Sep 7, 2017.

Tags:
Thread Status:
Not open for further replies.
  1. P

    PantherBoy Well-Known Member

    Joined:
    Jul 20, 2017
    Messages:
    72
    Likes Received:
    0
    Code (Skript):
    1. variables:
    2.     {case} = false
    3.     {jutalom} = 0
    4. command /case:
    5.     trigger:
    6.         if {case} is false:
    7.             if player's money is more than 9999:
    8.                 set {case} to true
    9.                 remove 10000 from the player's balance
    10.                 broadcast "&5A mágusraktár áldás aktiválva lett 5 percre"
    11.                 broadcast "&6Az áldást aktiválta: %player%"
    12.                 broadcast "&4A jutalmad megkapod a /jutalom parancsal"
    13.                 set {jutalom} to {jutalom} + 1
    14.                 wait 5 minutes
    15.                 set {case} to false
    16.                 message "&5A mágusraktár áldás lejárt!"
    17.             else:
    18.                 message "&cNincs elég pénzed"
    19.         else if {case} is true:
    20.             message "&cAz áldás már aktiválva van!"
    21. command /jutalom:
    22.     trigger:
    23.         if {jutalom.%player%} is more than 0:
    24.             message "&6Tessék a jutalmad:"
    25.             give player 1 diamond boots or 1 diamond chestplate or 1 diamond sword or 1 diamond helmet or 1 diamond leggings or 3 enchanted golden apples or 15 golden apples or 1 iron boots or 1 iron chestplate or 1 iron sword or 1 iron helmet or 1 iron leggings
    26.             set {jutalom.%player%} to {jutalom.%player%} - 1
    27.         else:
    28.             message "&cMár lehívtad a jutalmad!"
    The problem if when the case is true, and the player try to get the "jutalom", the jutalom.%player% is 0, so it writes the message.
    Why the program don't set the jutalom.%player% bigger?
    Sorry for my bad english :/
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,049
    Likes Received:
    145
    Just do this:

    Code (Skript):
    1.  
    2. add 1 to {jutalom.%player%}
    3.  
     
Thread Status:
Not open for further replies.
Loading...