Posts: 140
Threads: 35
Joined: Jul 2017
Hi guys I want to make an identifier with gettime to know if 90 seconds have passed.
I only have this that identifies if 6 minutes have not passed, but I want to detect if 90 seconds have already passed
PHP код:
if(gettime() < PLAYER[playerid][TIME] + 360) return SendClientMessage(playerid, -1, "You can only use this command every 6 minutes");
PLAYER[playerid][TIME] = gettime();
How could I make it detect if 90 seconds have already passed?
Posts: 6,242
Threads: 8
Joined: Jun 2008
6 * 60 = 360.
90 = 90.
PHP код:
if(gettime() < PLAYER[playerid][TIME] + 360)//<<
Posts: 118
Threads: 6
Joined: Jul 2018
Код HTML:
#define Is90SecondsHavePassed(%1) GetTickCount() > (CountTimer[%1]+90000)
new CountTimer[MAX_PLAYERS];
Starting counter:
CountTimer[playerid] = GetTickCount();
Function:
Is90SecondsHavePassed(playerid)// 90 Seconds have been passed
Posts: 140
Threads: 35
Joined: Jul 2017
Quote:
Originally Posted by Sew_Sumi
6 * 60 = 360.
90 = 90.
PHP код:
if(gettime() < PLAYER[playerid][TIME] + 360)//<<
|
I put that command to give an example of what I want to do. But what I want is for a message to appear that 90 seconds have already gone off, for example: "90 seconds have passed, you can not use this command.
"if(gettime() < PLAYER[playerid][TIME] + 360)" This only tells me that I can use the command every 6 minutes.
Posts: 140
Threads: 35
Joined: Jul 2017
Quote:
Originally Posted by Shinja
PHP код:
if(gettime() < PLAYER[playerid][TIME] + 90) return SendClientMessage(playerid, -1, "You can only use this command every 3 minutes");
PLAYER[playerid][TIME] = gettime();
|
No, this function only detects that you can use that command every 3 minutes and I want it to be 90 seconds after I can not use that command ...