[HELP] Fuel problem!!
#1

Alright, hello dear scripters, i had a big problem about my fuel system. The fact is fuel is going down even if the engine is on or off also if a driver is in or not. Here are the codes for fuel. Any ideas or any help? Thanks i will rep you guys if you help me fixing this. Have a nice day.

Код:
forward FuelTimer();
public FuelTimer()
{
	for(new vehid=0; vehid < MAX_VEHICLES; vehid++)
	{
		new enginec, lightsc, alarmc, doorsc, bonnetc, bootc, objectivec;
		GetVehicleParamsEx(vehid, enginec, lightsc, alarmc, doorsc, bonnetc, bootc, objectivec);
		if(enginec && Fuel[vehid])
		{
 			FuelVar[vehid] ++;
   			if(GetVehicleSpeed(vehid, 0) != 0 && FuelVar[vehid] >= 72/2)
    		{
     			FuelVar[vehid] = 0;
				Fuel[vehid] --;
			}
			else if(GetVehicleSpeed(vehid, 0) == 0 && FuelVar[vehid] >= 108/2)
  			{
     			FuelVar[vehid] = 0;
				Fuel[vehid] --;
			}
		}
	}
	return 1;
}
Reply


Messages In This Thread
[HELP] Fuel problem!! - by catal4n - 07.12.2016, 09:47
Re: [HELP] Fuel problem!! - by Logic_ - 07.12.2016, 09:56
Re: [HELP] Fuel problem!! - by catal4n - 07.12.2016, 10:20
Re: [HELP] Fuel problem!! - by catal4n - 07.12.2016, 10:33

Forum Jump:


Users browsing this thread: 2 Guest(s)