28.11.2011, 10:30
Hi All, I'm making a fuel system.
I have a "Fuel consumption" timer for all vehicles. When vehicle's fuel is out, it must stop the engine of this vehicle, but it stops all engines.
Some suggests?
Thanks you in advance
PD: Sorry for my bad english.
I have a "Fuel consumption" timer for all vehicles. When vehicle's fuel is out, it must stop the engine of this vehicle, but it stops all engines.
pawn Код:
public FuelConsumption(vehicleid)
{
for(new i=0;i<MAX_VEHICLES;i++)
{
// bla bla...
VehicleGas -= 1;
if(VehicleGas[i] == 0) SetVehicleParamsEx(i, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);
// blaa..
}
}
Thanks you in advance
PD: Sorry for my bad english.