generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Game Design
Home Search
 

Re: Getting number of days since a player last joined?

Previous Thread :: Next Thread 
IthacaMedia is not online. IthacaMedia
Joined: 25 Jan 2014
Total Posts: 1337
24 Dec 2014 01:56 PM
How would you get the number of days passed since a player last joined? Ex: If someone plays your game, then a week later they play again, I want to get the number 7, or if they played then played 3 days later, I want to get the number 3.
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
24 Dec 2014 02:03 PM
I thought you had like a 5 page thread asking about this already
Report Abuse
GodShowsTheWay is not online. GodShowsTheWay
Joined: 27 Oct 2014
Total Posts: 7180
24 Dec 2014 02:03 PM
os.time
Report Abuse
IthacaMedia is not online. IthacaMedia
Joined: 25 Jan 2014
Total Posts: 1337
24 Dec 2014 02:16 PM
I did, that was about a login bonus, which works fine now, but I'm still not sure how to get the number of days since they last joined :P.
Report Abuse
Unclear is not online. Unclear
Joined: 27 Aug 2011
Total Posts: 17060
24 Dec 2014 02:20 PM
Use os.time() and a form of datastore. Subtract, and convert the difference (which is in seconds) to days.
Report Abuse
IthacaMedia is not online. IthacaMedia
Joined: 25 Jan 2014
Total Posts: 1337
24 Dec 2014 11:07 PM
Ok thanks. What is the specific formula for that?
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
24 Dec 2014 11:32 PM
60 seconds = 1 minute
60 minutes = 1 hour
24 hours = 1 day
7 days = 1 week

so.. os.time() / 60 / 60 / 24 / 7 = days
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
24 Dec 2014 11:33 PM
= weeks*
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
25 Dec 2014 12:17 AM
when the leave the game save os.time
When they join lastjoin - os.time
You can find the convertion of seconds to days,hours,minutes on the web
Report Abuse
IthacaMedia is not online. IthacaMedia
Joined: 25 Jan 2014
Total Posts: 1337
25 Dec 2014 09:41 AM
Ok thanks xD.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image