smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 28 May 2014 12:37 PM |
| How can he track when a player last logged in? |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 28 May 2014 12:38 PM |
os.time() save it compare the saved os.time() to curren os.time() when player joins again |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 28 May 2014 12:38 PM |
Maybe he used HTTPService. Maybe he used the PlayerAdded Event, check the name and then do stuff. |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 28 May 2014 12:39 PM |
| maybe he didnt user httpservice and maybe he didnt over complicate his game |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
| |
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 28 May 2014 12:41 PM |
| Is there a wiki link to this 'os.time()'? I cannot find it.. |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 28 May 2014 12:42 PM |
print(os.time())
google unix time or something |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 28 May 2014 12:43 PM |
| That printed a bunch of numbers? |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 28 May 2014 12:43 PM |
google unix time or something google unix time or something google unix time or something google unix time or something google unix time or something google unix time or something google unix time or something
|
|
|
| Report Abuse |
|
|
|
| 28 May 2014 12:44 PM |
it prints the amount of seconds since a certain time, not sure when for os.time()
i know tick() does that too, it prints the amount of second since 1 Jan 1970 (i think?).
|
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 28 May 2014 12:46 PM |
| ^ os.time is the only way to get a synchronized server time, almost the same as tick |
|
|
| Report Abuse |
|
|
|
| 28 May 2014 12:48 PM |
yeah, just did some tests.
print(tick()-os.time()) --> 3600.RandomNumbersRobloxWontLetMePost?? (an hour).
|
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 28 May 2014 12:55 PM |
| what does "google unix time or something" mean |
|
|
| Report Abuse |
|
|
|
| 28 May 2014 12:56 PM |
im guessing it means you should google unix time and see what it is.
|
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 28 May 2014 12:58 PM |
>RandomNumbersRobloxWontLetMePost
omg dont post phone ###!!!! |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 28 May 2014 12:58 PM |
Okay i get it.
But how would convert it in a script |
|
|
| Report Abuse |
|
|
|
| 28 May 2014 01:00 PM |
-player joins -load the last time they were there -check the current time -do some if stuff and w/e -loop save the time while player is in game |
|
|
| Report Abuse |
|
|
|
| 28 May 2014 01:00 PM |
"seconds" do math (60s * 60min * 24h) get answer
~The herp lerped a derp~ |
|
|
| Report Abuse |
|
|
|
| 28 May 2014 01:01 PM |
you dont have to convert it, just do something like
difference = osTimeOnJoin - osTimeOnLeave if difference >= 86400 then -- 86400 = seconds in a day --do stuff on daily login end
--but of course, using data stores and playeradded/removing
|
|
|
| Report Abuse |
|
|