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 Cooldown time for argument player

Discussion in 'Skript' started by kamilleon, May 25, 2019.

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

    kamilleon Member

    Joined:
    Nov 18, 2017
    Messages:
    48
    Likes Received:
    0
    I wanted to create a plot rating point system for admins, to rate the players plots, and give them points depending on the rating.

    Also I wanted to add an anti-abuse system to it, so a player can be only rated once every hour, globally.


    Code (Text):
    1.                     else:
    2.                         set {_szam} to arg 3 parsed as a number
    3.                         set {_jatekos} to arg 2
    4.                         if {_szam} is set:
    5.                             set {_pontvart} to difference between {pontozottjatekos.%arg 2%} and now
    6.                             if {_pontvart} is less than {@pontozottjatekos}:
    7.                                 message "&6&lBalker&eCraft &8» &cEhhez még várnod kell %{pontozottjatekos.%arg 2%}% másodpercet!"
    8.                             else:
    9.                                 if {_szam} is between 1 and 10:
    10.                                     set {_szam} to {_szam}*10
    11.                                     add {_szam} to {rankpoint.%arg 2%}
    12.                                     add {_szam} to {koltopont.%arg 2%}
    13.                                     message "&6&lBalker&eCraft &8» &eHozzáadva &6%arg 2% &ejátékoshoz &6%{_szam}% &epont!"
    14.                                     set {pontozottjatekos.%arg 2%} to 3600
    15.                                 else:
    16.                                     message "&6&lBalker&eCraft &8» &cAdj meg egy pontozást 1-10-ig!"
    17.                         else:
    18.                             message "&6&lBalker&eCraft &8» &cAdj meg egy pontozást 1-10-ig!"
    But my current code doesn't work, in any way.
     
  2. AsuDev

    VIP

    Joined:
    Jan 27, 2017
    Messages:
    244
    Likes Received:
    22
    Code (Skript):
    1. set {pontozottjatekos.%arg 2%} to 3600
    2. # Above needs to be changed to this:
    3. set {pontozottjatekos.%arg 2%} to now
    When you said "difference between {pontozottjatekos.%arg 2%} and now" Its trying to compare two timespans but since {pontozottjatekos.%arg 2%} is not a timespan (a number), it won't work properly.

    Also make sure that:
    Code (Skript):
    1. options:
    2.     pontozottjatekos = 1 hour
     
  3. kamilleon

    kamilleon Member

    Joined:
    Nov 18, 2017
    Messages:
    48
    Likes Received:
    0
    Thank you, it works now :emoji_slight_smile:
     
  4. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    If you solv your issue, mark this post as solved.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...