GetTickCount bugs!! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: GetTickCount bugs!! (
/showthread.php?tid=637138)
GetTickCount bugs!! -
s3ek - 09.07.2017
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!!
Re: GetTickCount bugs!! -
Vince - 09.07.2017
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).
Re: GetTickCount bugs!! -
s3ek - 09.07.2017
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() ??
Re: GetTickCount bugs!! -
Freedom. - 09.07.2017
Код:
new something[playerid];
something[playerid] = gettime()+30;
if (gettime() - something[playerid] < 15)
return SendClientMessage(playerid, -1, "you need to wait 15 seconds");