SA-MP Forums Archive
Gettime help! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Gettime help! (/showthread.php?tid=626441)



Gettime help! - EskeL - 15.01.2017

Hello!

I have a problem with gettime point is that it does not turn up in the right time gives the code underneath

http://pastebin.com/j16ES8kL


Re: Gettime help! - BiosMarcel - 15.01.2017

if(hours >= 22 && hours <= 6) Means:

IF hours IS GREATER OR EQUAL TO 22 AND hour IS LESS OR EQUAL TO 6

Which is an impossible statement


Re: Gettime help! - Logic_ - 15.01.2017

^^
This must be if(hours >= 6 && hours <= 22).


Re: Gettime help! - EskeL - 15.01.2017

@Logic_

then it will operate between the hours of 6 to 22 and I need 22 to 6 am


Re: Gettime help! - BiosMarcel - 15.01.2017

PHP код:
if((hour >= 22 && hour <= 23) || (hour >= 0  && hour <= 6)) 



Re: Gettime help! - EskeL - 15.01.2017

@[Bios]Marcel

Oh thanks! it works.