Percentage in my GM
#1

Hi, I'm looking for a percentage system or something like that because I'm working in a /sellcar command, that makes the vehicle dissapear, and the money for the player, is the 65% of the real money that is in other public.

That's not my problem. My problem is i want to give the player, te 65% of the CarDealer.

I try with this, but in compiling i receive a "tag mismatch" message:
pawn Код:
GivePlayerMoney(playerid, (CostoCocheComprable(vehicleid)) / 1.53);
Reply
#2

https://sampwiki.blast.hk/wiki/Floatround
Reply
#3

pawn Код:
new PercentCalc = floatround( floatmul(CostoCocheComprable(vehicleid), 0.65 ), floatround_ceil );  //Calculating percentages is always "percentage/100". Which makes 65% 0.65.             
            GivePlayerMoney(playerid, PercentCalc);
Reply
#4

I already fix it doing this:
pawn Код:
GivePlayerMoney(playerid, (CostoCocheComprable(vehicleid)) * 65 / 100);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)