Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Convert this float to integer?

$
0
0
percent = 5; (int)
price = 10000; (int)
float: truePercent = percent/100.0; - this makes me %.2f = 0.05 - this what i need.

Now i need to do this: (price*truePercent)+price | example: (10000*0.05)+10000 = 10500
How to do this the best way with floatround and get this as integer? Its annoying me..

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>