Random Question (100-1000)
#1

Hey SA-MP,
Is it possible to randomize a number from 100-1000?
Can someone give me a source code if it is.
Cheers,
r3k
Reply
#2

pawn Код:
new Rand;
Rand = 10 + random(90);
Reply
#3

new rand = random ( 900 ) + 100;
Reply
#4

Ah yeah that's what I meanted :')
I did per accident 10-100 instead of 100-1000

pawn Код:
new Rand;
Rand = 100 + random(900);
Reply
#5

So that's a random number betwwen 10 and 1000?
Reply
#6

Let me explain.

new rand - Create a new variable to store information in.
random ( 900 ) - Retrieves a random number between 0 and 900.
+ 100 - Adds 100 to it.
Reply
#7

I see thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)