SA-MP Forums Archive
Random Timer interval? - 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: Random Timer interval? (/showthread.php?tid=562159)



Random Timer interval? - Supermaxultraswag - 07.02.2015

Код:
SetTimerEx("Fish", THERE how to make random interval from 5000 to 8000??, false, "i", playerid);



Re: Random Timer interval? - HazardouS - 07.02.2015

pawn Код:
new randomTime = 5000 + random(3001);
SetTimerEx("Fish", randomTime, false, "i", playerid);
random(3001) will give you values ranging between 0 and 3000, so 5000 + random(3001) can equal any value between 5000 and 8000.