Jump to content

[HELP] getRealTime() returns the time that is set on the player's computer


Recommended Posts

Hello,

I'm writing a script that gives you a random reward when you log in, once a day. I use getRealTime() to get the current date and I store it in account data, as player's last login. If the player's last login wasn't on this day, he gets his reward. It's working fine, but if I change the date on my computer (I change it from 8/13 to 8/14) then I can get my reward again. The script was made on serverside. Is this supposed to work like this? How should I solve this problem? 

Link to comment
  • Moderators
35 minutes ago, Paradoxon666 said:

If the player's last login wasn't on this day, he gets his reward. It's working fine, but if I change the date on my computer (I change it from 8/13 to 8/14) then I can get my reward again. The script was made on serverside.

That only happens on a local server, since clients/players normally can't change the server `realtime`.
Or your code is clientside by accident.

  • Thanks 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...