percentage function
#2

pawn Код:
new p = floatround(100 * random(100) / 100, floatround_round);

printf("percent : %d %", p);
or if you want float value
pawn Код:
new Float:p = 100 * random(100) / 100;

        printf("percent : %0.2f %", p);
Reply


Messages In This Thread
percentage function - by pedrotvr - 31.12.2014, 14:32
Re: percentage function - by rickisme - 31.12.2014, 14:45
AW: percentage function - by Nero_3D - 31.12.2014, 16:01

Forum Jump:


Users browsing this thread: 2 Guest(s)