14.08.2011, 18:45
For example getting 15% of some numeric value. I saw servers doing that. How?
24 / 153 * 100 = 15,7%
new moneys, percent;
moneys = GetPlayerMoney(playerid)
percent = (moneys * 15) / 100
stock ToPercentage(value, percentage)
{ return (value/100)*percentage; }
//Now you can use ToPercentage(5500, 15);
//It will return 15% of 5,500