Random
#1

Hey ... Sorry for post this here, I know I should've PM ****** about this but anyhow. I remember ****** had a function, that used to random from a minimum number to a maximum.

It was something like:
pawn Код:
rand(min, max)
//example:
rand(100, 1000) // Would give a random number from 100 to 1000.
I can't remember exactly what it was like so, if anyone has any idea how it was, I would appreciate it.


Thanks.
Reply
#2

Quote:
Originally Posted by antonio112
Посмотреть сообщение
Hey ... Sorry for post this here, I know I should've PM ****** about this but anyhow. I remember ****** had a function, that used to random from a minimum number to a maximum.

It was something like:
pawn Код:
rand(min, max)
//example:
rand(100, 1000) // Would give a random number from 100 to 1000.
I can't remember exactly what it was like so, if anyone has any idea how it was, I would appreciate it.


Thanks.
PHP код:
#define randomize(%1,%2) random(%2-%1)+%1 
Reply
#3

MoroDan, that should do it, thanks.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)