random with precents?
#4

PHP код:
stock bool:IsDropAllow(chance){
    if(
chance <= 0) return false;
    if(
chance >= 100) return true;
    if((
random(100)+1) <= chance) return true;
    return 
false;

Reply


Messages In This Thread
random with precents? - by Lirbo - 19.01.2016, 08:26
Re: random with precents? - by M4D - 19.01.2016, 08:38
Re: random with precents? - by AmigaBlizzard - 19.01.2016, 12:56
Re: random with precents? - by AbyssMorgan - 19.01.2016, 13:06

Forum Jump:


Users browsing this thread: 3 Guest(s)