GetTickCount bugs!!
#1

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 :
PHP код:
    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!!
Reply
#2

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).
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
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 203.
how i can use gettime() ??
Reply
#4

Код:
new something[playerid];

something[playerid] = gettime()+30;

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


Forum Jump:


Users browsing this thread: 1 Guest(s)