Random.
#1

Hi,

Can i generate random number from variable?

new ASDAs = 10;

new RANDOMNUMBER = random( ASDAs);
Reply
#2

You got it correct..

pawn Код:
new var = 10, randnum = random(var);
printf("Random number: %d", randnum);
Reply
#3

As long as the argument is an integer type. You could test it yourself using https://sampwiki.blast.hk/wiki/Printf, as shown in Prodigy's example.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)