random
#2

You could use a switch. Also note that random(12) will generate a random number from 0 to 11. Not 1 to 12. If that's what you want, you should use: debug = random(12)+1;

pawn Код:
new debug = random(12);
switch(debug)
{
    case 0..4:
    {
        //Do whatever you want
    }
    case 5..11:
    {
        //Color black
    }
}
Reply


Messages In This Thread
random - by tooMuch - 30.01.2015, 18:53
Re: random - by Schneider - 30.01.2015, 19:04
Re: random - by CalvinC - 30.01.2015, 19:06
Re: random - by tooMuch - 30.01.2015, 19:07
Re: random - by tooMuch - 30.01.2015, 19:35
Re: random - by CalvinC - 30.01.2015, 19:49
Re: random - by tooMuch - 30.01.2015, 20:30
Re: random - by tooMuch - 30.01.2015, 20:46

Forum Jump:


Users browsing this thread: 2 Guest(s)