PDA

View Full Version : GetTickCount


BaubaS
31/12/2011, 12:40 AM
So, I created anti cmd/text spam using GetTickCount, but seems like it doesnt work. I can spam as much I want.


if (iTextSpam[playerid] + 2 > GetTickCount() && iTextSpam[playerid] > 0)
{
return 0;
}
iTextSpam[playerid] = GetTickCount();

ғαιιοцт
31/12/2011, 12:47 AM
GetTickCount returns time in milliseconds, not seconds.

So change it to +2000.

BaubaS
31/12/2011, 12:51 AM
Aah, thanks.. I always mix gettime and GetTickCount returning values :D

ғαιιοцт
31/12/2011, 12:55 AM
Oh, don't they buth return in milliseconds?
I can only find wat TickCount returns on the wiki, but I do think GetTickCount also returns ime in ms.

Jefff
31/12/2011, 01:01 AM
Use gettime();

BaubaS
31/12/2011, 01:13 AM
Yes, gettime returns in seconds.

@Jefff: AFAIK GetTickCount is better when working with 1-5seconds.