Random?
#1

I've searched a lot.. but I find no solutions. Is there any possibility to make a random between 2 numbers? For example between 5 and 10. I hope you can help me.
Reply
#2

Quote:
Originally Posted by XCarBOn
Посмотреть сообщение
I've searched a lot.. but I find no solutions. Is there any possibility to make a random between 2 numbers? For example between 5 and 10. I hope you can help me.
pawn Код:
new
    randomvalue[] = { 5, 10 };
printf(" %d", randomvalue[random(sizeof randomvalue)]); //5 or 10
pawn Код:
printf(" %d", random(5)+5); // 5 or 6, 7, 8, 9
printf(" %d", random(4)+6); // 6 or 7, 8, 9
randomex:
http://forum.sa-mp.com/showpost.php?...&postcount=773
Reply
#3

Works fine.. Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)