Jump to content
MakeWebGames

Recommended Posts

Posted

I am not sure where to post it, so ill try here. I was wondering how do I make a count down timer between energy gains: EX { Energy: 2 minutes 02 seconds} and every time the cron runs it would start all over again. I tried figuring it out, but its beyond me. lol And I know someone here is a wiz, and can figure it out.

Energy Regain: +5 every 10 minutes. (00:14s)

Is how it would look

Posted

im not sure how you would do this....but i know what you would need to do it..lol

if you want it so that each time you refresh the page it will show the time remaining you will need to use timestamps i believe..

but if you want it so it continuously countsdown with out refreshing you would need javascript i believe...

im interesting in seeing this get solved because i wanna do something like this with my mug system...so it says how much time is left before they can mug again..

Posted

Yeah, Like curt said i would do it using Timestamps. Add a new row in your settings called something like fivemincron. Then get it to update that record with a timestamp when the cron is run. then on the main page just simply format the time stamp static using php or put it in to a JavaScript function to make it dynamic and count down in real time.

This might be helpful for the javascript part:

http://www.phpfreaks.com/forums/index.php?topic=228348.0

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...