I've been experimenting a lot with trying to find the right "formula" for having the user's character work for a certain amount of time and then the user is done working. If you have any ideas for making a script for this?
Thanks!
I've been experimenting a lot with trying to find the right "formula" for having the user's character work for a certain amount of time and then the user is done working. If you have any ideas for making a script for this?
Thanks!
You'll have to give us more information. You can store time in a database and add time as needed, then change some status information once you reach a certain level. But beyond that, we'll need to know a lot more about your site.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Well let's say for example the user will work for 8 hours. What would be the best method for getting the time plus the eight hours. When the user logs in, the page would check if the current time is the same or greater than the work time. The work time script would need to take into consideration the changing of years and the time going past midnight.
Hope that gives a better idea of what I need some help with!
Thanks!
If you work with timestamps, none of that is a problem. Just use basic math (addition and/or subtraction) then convert them to readable dates later.
https://www.google.com/search?q=work...h+dates+in+php
If you want someone to build this for you, you should post in the paid work requests area. You can probably do this yourself if you aren't in a big hurry. Just take it one step at a time, and it should work. It's not especially difficult to work with time once you understand it, and it doesn't take that long to learn.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Thanks for getting me started! I believe I got a usable script I came up with!
Thanks again, can't believe I just should of thought of searching "working with dates in php".
Bookmarks