Simple Math Help
#5

new
const perGain = 10000,//10k
const modDamage = 100,//default vehicle health is 1000.0
const defaultPrice = 0

Float:Vechp;
GetVehicleHealth(GetPlayerVehicleID(playerid),Vech p);
new
const earnCash = perGain*(Vechp/modDamage)+defaultPrice;
GivePlayerMoney(playerid,earnCash);
printf("earn %d",earnCash);

Converse thought.

Edited some type error
Reply


Messages In This Thread
Simple Math Help - by StrickenKid - 27.03.2009, 00:30
Re: Simple Math Help - by Nubotron - 27.03.2009, 01:07
Re: Simple Math Help - by Salmon - 27.03.2009, 01:09
Re: Simple Math Help - by StrickenKid - 27.03.2009, 01:46
Re: Simple Math Help - by yezizhu - 27.03.2009, 01:54
Re: Simple Math Help - by StrickenKid - 27.03.2009, 04:03
Re: Simple Math Help - by Salmon - 27.03.2009, 10:31

Forum Jump:


Users browsing this thread: 4 Guest(s)