Posts: 3,351
Threads: 780
Joined: Jan 2010
Hello,i've this timer for stay the player in jail,it's currently 30 seconds.
I need to randomize it from 1 minute to 20,how?
pawn Код:
JailTimerID[playerid] = 30;
Posts: 304
Threads: 18
Joined: May 2011
Reputation:
0
Use the function Random(MAX_VALUE);
I think it's named something like that.
Posts: 3,351
Threads: 780
Joined: Jan 2010
Posts: 178
Threads: 17
Joined: Apr 2010
Reputation:
0
of min 20, max 60 seconds.
if you do it in seconds, it shall look like this:
new jailtimersec=20+random(40)
Let random be 0 and 40. if it's 0, it's 20, and if it's 40, ot's 60. So, there u are.