07.03.2011, 21:00
This is most basic calculation of percentage.
Money * ( 1.0 - (percent / 100) ) will return the money reduces by <percent> percent.
E.g.
10000 * (1.0 - (4 / 100))
= 10000 * (0.96)
will decrease 10000 by 4%
@Hiddos: your code will increase the players money by 4% instead of decreasing it
Money * ( 1.0 - (percent / 100) ) will return the money reduces by <percent> percent.
E.g.
10000 * (1.0 - (4 / 100))
= 10000 * (0.96)
will decrease 10000 by 4%
@Hiddos: your code will increase the players money by 4% instead of decreasing it