I need a timer
#4

Why bother using a timer when you can use gettime() or GetTickCount()

It's pretty simple

pawn Код:
// Define your specific cool down time
#define COOLTIME_SOMETHING 300 // 5 Minutes

// Use time of the cool down time for each player
new UseTime[MAX_PLAYERS]


// Used in any command/function to check and set a players cool down time
.......
if(gettime() - UseTime[playerid] > COOLTIME_SOMETHING)
{
    UseTime[playerid] = gettime();
    ......
}
See absolutely no need for timer.
Reply


Messages In This Thread
I need a timer - by scout322 - 05.06.2013, 18:30
Re: I need a timer - by scout322 - 05.06.2013, 18:44
Re: I need a timer - by scout322 - 05.06.2013, 19:55
Re: I need a timer - by Pottus - 05.06.2013, 20:02
Re: I need a timer - by scout322 - 05.06.2013, 20:04
Re: I need a timer - by scout322 - 05.06.2013, 20:10
Re: I need a timer - by scout322 - 05.06.2013, 21:53
Re: I need a timer - by Vince - 05.06.2013, 22:41
Re: I need a timer - by GWMPT - 06.06.2013, 00:30
Re: I need a timer - by scout322 - 06.06.2013, 06:46

Forum Jump:


Users browsing this thread: 1 Guest(s)