Jump to content
MakeWebGames

Cron alternative?


Kasabian
 Share

Recommended Posts

Re: Cron alternative?

we did a lengthy discussion about cron alternatives, search the forum for it. it should be easy to find

 

for hosp times

it goes like this

 

hosp time = time() + 60 * $random;

where $random is your random number of minutes you want them in hosp.

 

then,

if (hosp time > time()) { you're still in hosp}

 

it's super simple. there is no one minute, or five minute cron on my game, and hosp and jail time are not run by crons at all.

a benefit to this, is hosp time and jail time is exact to the second

check it out on my game some time.

if you have less than 3 minutes in hosp/jail, the seconds left is display with the minute.

:D

Link to comment
Share on other sites

Re: Cron alternative?

 

we did a lengthy discussion about cron alternatives, search the forum for it. it should be easy to find

 

for hosp times

it goes like this

 

hosp time = time() + 60 * $random;

where $random is your random number of minutes you want them in hosp.

 

then,

if (hosp time > time()) { you're still in hosp}

 

it's super simple. there is no one minute, or five minute cron on my game, and hosp and jail time are not run by crons at all.

a benefit to this, is hosp time and jail time is exact to the second

check it out on my game some time.

if you have less than 3 minutes in hosp/jail, the seconds left is display with the minute.

:D

well said!

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.

 Share

×
×
  • Create New...