Is it possible to make a command by time?
#1

Hi,
I mean is it possible to do a command that will work only between 21:00 to 8:00?
i tried that:
Код:
if(!strcmp(cmd, "/test1", true))
	{
	    new time[3];
	    gettime(time[0], time[1], time[2]);
	    if(time[0] > 21 && time[0] < 8)
	    {
	        SendClientMessage(playerid, red, "Works.");
		}
	    return 1;
	}
But this seems to not work.

Any help?
Reply
#2

Sir maybe try:

Код:
if((time[0] >= 21 && time[0] <= 24) || (time[0] >= 0 && time[0] <= 8))
(:
Reply
#3

Quote:
Originally Posted by ryansheilds
Посмотреть сообщение
Sir maybe try:

Код:
if((time[0] >= 21 && time[0] <= 24) || (time[0] >= 0 && time[0] <= 8))
(:
THANK YOU <3
Reply
#4

why dont you use zcmd..? more better and faster
Reply
#5

Quote:
Originally Posted by SupaVZ
Посмотреть сообщение
why dont you use zcmd..? more better and faster
strcmp does better in this case, there is no command params
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)