13.03.2019, 15:47
Since you are dividing 10 by 100 you are getting a float instead of an integer.
So you will have to change
to
For dividing floats you need to use the function:
So your code would look like this:
You should use the function floatround to convert this float to an integer if you intend to use it that way. https://sampwiki.blast.hk/wiki/Floatround
So you will have to change
Quote:
new tax; |
Quote:
new Float: tax; |
Quote:
floatdiv(Float:dividend, Float:divisor) |
Quote:
tax = floatdiv(GovTax/100)*PlayerInfo[playerid][pSigncheck]; format(m, sizeof(m), "Tax: %f", tax); |