23.12.2014, 15:48
Might come in handy at some point for you.
Note: GetPercentage(price, 75) will get the percentage of 75 for the value you specified, it acts like 0.75. Example: GetPercentage(500, 1) will return 5$ for 0.01%
Note: GetPercentage(price, 75) will get the percentage of 75 for the value you specified, it acts like 0.75. Example: GetPercentage(500, 1) will return 5$ for 0.01%
pawn Код:
stock GetPercent(Float:number, Float:percentage)
{
new Float:FinalSum;
FinalSum = (number/100)*percentage;
return floatround(FinalSum);
}