Random money
#3

The above (from your quote) would return some weird value as the input must be 0 to max-1.

pawn Код:
RandomEx(min, max) // By ******
{
    return random(max - min) + min;
}
EDIT: usage:
pawn Код:
new cash = RandomEx(8000, 40001);
cash is a value between 8000 and 40000.
Reply


Messages In This Thread
Random money - by GTLS - 17.05.2015, 09:22
Re: Random money - by VishvaJeet - 17.05.2015, 09:27
Re: Random money - by Konstantinos - 17.05.2015, 09:27
Re: Random money - by GTLS - 17.05.2015, 09:28
Re: Random money - by GTLS - 17.05.2015, 09:35
Re: Random money - by VishvaJeet - 17.05.2015, 09:38
Re: Random money - by GTLS - 17.05.2015, 09:40
Re: Random money - by Konstantinos - 17.05.2015, 09:46
Re: Random money - by GTLS - 17.05.2015, 10:02
Re: Random money - by VishvaJeet - 17.05.2015, 10:08

Forum Jump:


Users browsing this thread: 1 Guest(s)