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: How did loleris make a daily login bonus?

Previous Thread :: Next Thread 
smiley599 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
28 May 2014 12:40 PM
user minus r
Report Abuse
smiley599 is not online. 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 is not online. 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 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
28 May 2014 12:43 PM
That printed a bunch of numbers?
Report Abuse
Trioxide is not online. 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
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
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 is not online. 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
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
28 May 2014 12:48 PM
yeah, just did some tests.

print(tick()-os.time()) --> 3600.RandomNumbersRobloxWontLetMePost?? (an hour).

Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
28 May 2014 12:55 PM
what does "google unix time or something" mean
Report Abuse
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
28 May 2014 12:56 PM
im guessing it means you should google unix time and see what it is.

Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
28 May 2014 12:58 PM
>RandomNumbersRobloxWontLetMePost

omg dont post phone ###!!!!
Report Abuse
smiley599 is not online. 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
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
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
filiptibell is not online. filiptibell
Joined: 10 Mar 2013
Total Posts: 2362
28 May 2014 01:00 PM
"seconds"
do math (60s * 60min * 24h)
get answer

~The herp lerped a derp~
Report Abuse
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
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
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