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 » Scripting Helpers
Home Search
 

Re: Daily Awards

Previous Thread :: Next Thread 
ELETROG is not online. ELETROG
Joined: 11 Jul 2013
Total Posts: 604
28 Sep 2014 03:48 AM
How do games such as "Work at Pizza Place", "The Mad Murderer", "Super Bomb Survival", "Animation Lab", "Destruction Run"...

How do those games award the players game cash every day the player plays their game? Like if u come back to play the game after 24h, the player gets rewarded the daily award.
Report Abuse
bob10110 is not online. bob10110
Joined: 09 Dec 2007
Total Posts: 679
28 Sep 2014 04:20 AM
The short answer is os.time(). This function returns (roughly) the number of seconds since January 1, 1970.

You can then store this value in a DataStore, and check how much time has passed since then the next time a player connects (by calling os.time() again and finding the difference).
Report Abuse
ELETROG is not online. ELETROG
Joined: 11 Jul 2013
Total Posts: 604
28 Sep 2014 04:31 AM
Where did u get January 1st 1970 from?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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