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
|
  |
| 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
|
  |
| Joined: 11 Jul 2013 |
| Total Posts: 604 |
|
|
| 28 Sep 2014 04:31 AM |
| Where did u get January 1st 1970 from? |
|
|
| Report Abuse |
|
|