Taking a percentage of playr money
#3

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
Reply


Messages In This Thread
Taking a percentage of playr money - by Snowman12 - 07.03.2011, 20:54
Re: Taking a percentage of playr money - by Hiddos - 07.03.2011, 20:57
Re: Taking a percentage of playr money - by Mauzen - 07.03.2011, 21:00
Re: Taking a percentage of playr money - by Sujer - 19.03.2011, 10:47
Re: Taking a percentage of playr money - by Biesmen - 19.03.2011, 10:49

Forum Jump:


Users browsing this thread: 1 Guest(s)