Jump to content

Recommended Posts

What this script does, is well in my game i have resets, and i want this timer to show when reset is going to be, and right now it's set to every midnight, can someone tell me or give me a script that tells you every 6:00 PM

and when it's 6:00 Pm it says Night reset blablabla.

 

or

can you make it so it will show how much minutes, seconds, and hours till 6:00 PM?

 

 

 

 

$resethoursleft = 23 - $hour; if($resethoursleft < "10"){$resethoursleft = "0$resethoursleft";}

$resetminutesleft = 59 - $minute; if($resetminutesleft < "10"){$resetminutesleft = "0$resetminutesleft";}

$resetsecondsleft = 60 - $second; if($resetsecondsleft < "10"){$resetsecondsleft = "0$resetsecondsleft";}

$h = "hours";

$m = "min.";

$s = "sec.";

 

if($resethoursleft > "0"){

$resethours = $resethoursleft*60;

$resethours = $resethours*60;

}

if($resetminutesleft > "0"){

$resetminutes = $resetminutesleft*60;

}

$reset = $resetsecondsleft+$resetminutes+$resethours;

 

echo "

Current Game Time:<br>

<b>$today, <span id=\"clock\"></span></b><br>

<script type=\"text/javascript\">

new showLocalTime(\"clock\", \"server-php\", 0, \"short\")

</script>

 

Nightly Reset In:<br>

<span id=\"tick_reset\"></span>

<script language=\"JavaScript\">

<!--

CountDown('$reset','tick_reset','<b>Happening Right Now!<b>');

// -->

</script><br></center>

";

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/65890-php-help-please/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.