Solved Time difference for voting

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

NeptunePlayz

Member
Apr 23, 2017
13
0
0
36
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:
every 5 minutes:
 loop all players:
  if {vote::cooldown::%loop-player's uuid%} is not set:
   send "&eIf you enjoy playing on the server, please consider voting for our playerserver to help it get better!" to loop-player
   send "<link:https://playerservers.com/server/grandnetwork/vote>&a&lClick here to vote!<reset>" to loop-player

on join:
 if {vote::cooldown::%player's uuid%} is not set:
  wait 1 second
  send "&eWe noticed that you haven't voted for us today, please consider voting."
  send "<link:https://playerservers.com/server/grandnetwork/vote>&a&lClick here to vote!<reset>"

command /setvote [<offlineplayer>]:
 permission: console
 trigger:
  if sender is console:
   set {vote::cooldown::%arg-1's uuid%} to now
   set {difference::%arg-1's uuid%} to difference between {vote::cooldown::%arg-1's uuid%} and now
   set {remaining-time::%arg-1's uuid%} to difference between {difference::%arg-1's uuid%} and 24 hours

every tick:
 loop all players:
  if difference between {remaining-time::%loop-player's uuid%} and {difference::%loop-player's uuid%} is more than 1 tick:
   delete {vote::cooldown::%loop-player's uuid%}

I basically want to disable notifications for people, if they have voted.
[doublepost=1579097190,1579021231][/doublepost]Anyone?
[doublepost=1579357544][/doublepost]I managed to fix it.
 
Status
Not open for further replies.