Random Number
#3

If you want to randomize between a minimal and a maximal number you can use randomex:
pawn Код:
stock randomex(min, max)
{
    return random(max - min) + min;
}
For example:
random(5) can return 0,1,2,3,4,5 while randomex(3,5) can return 3,4,5.
Reply


Messages In This Thread
Random Number - by FreeSoul - 21.01.2012, 20:40
Re: Random Number - by Konstantinos - 21.01.2012, 20:41
Re: Random Number - by [XST]O_x - 21.01.2012, 20:48
Re: Random Number - by Konstantinos - 21.01.2012, 20:52
Re: Random Number - by [XST]O_x - 21.01.2012, 20:54
Re: Random Number - by Chris White - 21.01.2012, 21:00
Re: Random Number - by [HiC]TheKiller - 21.01.2012, 21:36
Re: Random Number - by Gh05t_ - 21.01.2012, 21:50
Re: Random Number - by Macluawn - 21.01.2012, 21:51
Re: Random Number - by [HiC]TheKiller - 21.01.2012, 22:04

Forum Jump:


Users browsing this thread: 1 Guest(s)