PDA

View Full Version : GetTickCount bugs!!


s3ek
09/07/2017, 01:09 PM
my server bug i niver see this bug!! and i restart and bug still ..

bug is when i use type any commands server say: You must wait 10 seconds before using this command again...

pleas help me

all commands have :
if(GetPVarInt(playerid,"aaABUSE")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"* You must wait 10 seconds before using this command again...");
SetPVarInt(playerid,"aaABUSE",GetTickCount()+10000);

and no bugs.. only today i have this bug .. i restart and bug still.. all commands blocked you cant use!!

Vince
09/07/2017, 01:45 PM
Reboot the actual physical server. The tickcount is known to overflow after 24 days of continuous operation. Also for intervals greater than a second I recommend using gettime() instead, which incidentally doesn't suffer from this problem (at least until the year 2038).

s3ek
09/07/2017, 01:54 PM
Reboot the actual physical server. The tickcount is known to overflow after 24 days of continuous operation. Also for intervals greater than a second I recommend using gettime() instead, which incidentally doesn't suffer from this problem (at least until the year 2038).

how i can use gettime() ??

Freedom.
09/07/2017, 01:59 PM
new something[playerid];

something[playerid] = gettime()+30;

if (gettime() - something[playerid] < 15)
return SendClientMessage(playerid, -1, "you need to wait 15 seconds");