21.01.2012, 21:36
Quote:
If you want to randomize between a minimal and a maximal number you can use randomex:
pawn Код:
random(5) can return 0,1,2,3,4,5 while randomex(3,5) can return 3,4,5. |
pawn Код:
#define randomex(%1,%2) random(%1 - %2) + %2
pawn Код:
new randomnum = random(100) + 1;
//Numbers start at 0 and would go to 99 but we added the +1 so it went from 1 -> 100.