09.12.2012, 09:32
PHP код:
#define MaxFuel 100
// This goes inside your public ReFill(playerid)
new Amount = MaxFuel - Vehicles[PCar][Fuel];
new RefuelPrice = (Amount *3) / MaxFuel;
if (GivePlayerMoney(playerid, -RefuelPrice))
{
// Working code in here.
}
else
{
//You don't have enough money.
}