Raised This Month: $ Target: $400
 0% 

get Day / Night


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 12-26-2014 , 07:15   Re: get Day / Night
Reply With Quote #6

You might want to use this function instead:
PHP Code:
time(&hour=0, &minute=0, &second=0); 
so you would have number of hours as an integer instead of a string, so comparing it to other values would be easier.
PHP Code:
new iHours;
time(iHours);
// iHours now contains number of hours!
// ...
if(iHours >= 22 && iHours 7)
{
    
// Nighttime is from 10 PM to 7 AM

klippy is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode