Quote:
Originally Posted by thuron
Quote:
Originally Posted by thuron
simply said: i want a way to view a percentage of a changing total. like 1st time it is 5 out of 360, second time it is 140 out of 1945. and the percentage will both 1st and 2nd time, tell the percentage of the small variable, out of the largest one, the max.
|
read it. the Health is just something to explain it. not the real thing
|
if i get it right you need something like this:
pawn Код:
new Float:num = 65489; // This r your total crap
new Float:num2 = 100; // This r your num you want the percentage from..?
new Float:divider = (num/100);
new Float:percentage = (num2/divider);
printf("This r your percentage: %.02f%%", percentage);