random?
#1

hey can i make a random like random from 4000-6000 and not random(6000) which would range from 1-6000?
Reply
#2

random(6000) would only be from 0 - 5999 by the way.

If you want to do that, use this function from ******:
pawn Код:
stock minrand(min, max) //By Alex "******" Cole
{
    return random(max-min)+min;
}
Reply
#3

pawn Код:
new rand = random(6000) + 4000;
Reply
#4

so how we use?
pawn Код:
new rand = minrand(5000-10000);
@bigcomfycouch (sorry if misspell) what would that do?
Reply
#5

If you wanted 4000 - 6000:

pawn Код:
new rand = minrand(4000, 6000);
Reply
#6

pawn crashed?

new randlotto = minrand(50000, 100000);

#define LOTTO_JACKPOT randlotto //How much it goes up every 30 seconds or whenever someone buys a ticket
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)