Jump to content
MakeWebGames

Display amount of seconds left in hospital/jail [A few lines-No SQL Needed]


bloodless2010

Recommended Posts

Hi!

So recently I was looking through the archive and I saw someone asking how to put the seconds left in the message where it says your jail/hospital time,

he got a bunch of replies saying use unix timestamp, but I instantly thought, why would you need that?

This came into my head straight away: Cronjobs are usually synched with the server time, as I'm using timestamps to update my minutes on my game (instead of cronjobs) it's perfectly in synch with the time. So I did this very simple code:

In header.php:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

It's so simple, you don't need to do add any unix timestamps to use with the minutes, this is perfect and simple! and a nice little addition,

Please let me know if it works fine with cronjobs! :)

This is my first mod, but hey, everyone has got to start somewhere?

 

-- I made this in V1, it should work in V2, If it doesn't, could someone please convert it? :)

Link to comment
Share on other sites

There is no need to convert it over it will work just fine. But a while ago I added this for a time travel mod I put in my game which is found on cronus' blog

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

So you would just need to change the variable to what you would like to use it for. But other than that your is simple and to the point which there is nothing wrong with that.

Link to comment
Share on other sites

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...