Percents
#6

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
pawn Код:
switch (random(10))
{
    case 0, 1:
    {
        // 20%
    }
}
Hello again, I want to ask does this code generate 10 or 11 numbers in the sense of adding 0 as another number + those from 1 to 10 are 11 or so?

I ask because there wondering one thing and do not know whether it is so

with 27 numbers
PHP код:
    switch (random(27-RLTnfo[playerid][Chance]))
    {
        case 
0,1//7,40% - 28,57% by 20 level Chance
        
{
        
//code
        
}
    } 
or

with 27 numbers plus a zero to the numbers from 1 to 27 = 28
PHP код:
    switch (random(27-RLTnfo[playerid][Chance]))
    {
        case 
0,1//7.14% - 25% by 20 level Chance
        
{
        
//code
        
}
    } 
Which of these is the 2 correct?
Reply


Messages In This Thread
Percents - by rumen98 - 12.05.2014, 18:19
Re: Percents - by Konstantinos - 12.05.2014, 18:22
Re: Percents - by rumen98 - 12.05.2014, 18:30
Re: Percents - by Konstantinos - 12.05.2014, 18:34
Re: Percents - by rumen98 - 12.05.2014, 19:04
Re: Percents - by rumen98 - 13.05.2014, 11:58
Re: Percents - by Konstantinos - 13.05.2014, 12:09
Re: Percents - by rumen98 - 13.05.2014, 12:14
Re: Percents - by Konstantinos - 13.05.2014, 12:18
Re: Percents - by rumen98 - 13.05.2014, 12:23

Forum Jump:


Users browsing this thread: 4 Guest(s)