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 Time difference for voting

Discussion in 'Skript' started by NeptunePlayz, Jan 14, 2020.

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

    NeptunePlayz Member

    Joined:
    Apr 23, 2017
    Messages:
    13
    Likes Received:
    0
    I wonder how to do this, if someone can fix this skript for me, I would really appreciate it. I found some stuff on the internet, but I didn't quite understand it, so this is why I am asking for this.

    Code (Text):
    1. every 5 minutes:
    2.  loop all players:
    3.   if {vote::cooldown::%loop-player's uuid%} is not set:
    4.    send "&eIf you enjoy playing on the server, please consider voting for our playerserver to help it get better!" to loop-player
    5.    send "<link:https://playerservers.com/server/grandnetwork/vote>&a&lClick here to vote!<reset>" to loop-player
    6.  
    7. on join:
    8.  if {vote::cooldown::%player's uuid%} is not set:
    9.   wait 1 second
    10.   send "&eWe noticed that you haven't voted for us today, please consider voting."
    11.   send "<link:https://playerservers.com/server/grandnetwork/vote>&a&lClick here to vote!<reset>"
    12.  
    13. command /setvote [<offlineplayer>]:
    14.  permission: console
    15.  trigger:
    16.   if sender is console:
    17.    set {vote::cooldown::%arg-1's uuid%} to now
    18.    set {difference::%arg-1's uuid%} to difference between {vote::cooldown::%arg-1's uuid%} and now
    19.    set {remaining-time::%arg-1's uuid%} to difference between {difference::%arg-1's uuid%} and 24 hours
    20.  
    21. every tick:
    22.  loop all players:
    23.   if difference between {remaining-time::%loop-player's uuid%} and {difference::%loop-player's uuid%} is more than 1 tick:
    24.    delete {vote::cooldown::%loop-player's uuid%}
    I basically want to disable notifications for people, if they have voted.
    --- Double Post Merged, Jan 15, 2020, Original Post Date: Jan 14, 2020 ---
    Anyone?
    --- Double Post Merged, Jan 18, 2020 ---
    I managed to fix it.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...