random mumber help
#1

Код:
new Rand;
Rand = random(100);
I want this to be random 10-100 not random 0-100 can someone show me i cant find a good wiki link on it:S

plz help
Reply
#2

rand = random( 90 ) + 10;
Reply
#3

That dont look right can u like explain it

EDIT: i want it to pick a number from 10 to 100..
Reply
#4

I think there might be a function for this in usefull functions topic. I wrote a crude way to do it but there are probably much better ways to do it.
pawn Код:
new
    rand = random(90) + 1;
if(rand < 10) rand += 10;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)