Fuel error
#1

When someone comes onto the server and does /car engine to any car, it says it has no fuel:

Код:
forward SetVehicleEngine(vehicleid, playerid);
public SetVehicleEngine(vehicleid, playerid)
{
	new string[128];
	new engine,lights,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
    if(engine == VEHICLE_PARAMS_ON)
	{
		SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
		SendClientMessageEx(playerid, COLOR_WHITE, "Vehicle engine stopped successfully.");
		arr_Engine{vehicleid} = 0;
		if(IsABaitCar(vehicleid) && BaitCarActive == 1)
		{
			foreach(Player, i)
			{
				PlayerTextDrawSetString(i, Textdraw9, "  ~r~OFF");
			}
		}
	}
    else if(engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET)
	{
		new
			Float: f_vHealth;

		GetVehicleHealth(vehicleid, f_vHealth);
		if(f_vHealth < 350.0) return SendClientMessageEx(playerid, COLOR_RED, "The car won't start - it's totalled!");
	    if(VehicleFuel[vehicleid] <= 0.0) return SendClientMessageEx(playerid, COLOR_RED, "The car won't start - there's no fuel in the tank!");
		SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
		SendClientMessageEx(playerid, COLOR_WHITE, "Vehicle engine started successfully (/car engine to turn the engine off).");
		arr_Engine{vehicleid} = 1;
Reply


Messages In This Thread
Fuel error - by MrCallum - 21.05.2016, 14:14
Re: Fuel error - by luke49 - 21.05.2016, 14:18
Re: Fuel error - by maximthepain - 21.05.2016, 14:23
Re: Fuel error - by MrCallum - 21.05.2016, 14:30
Re: Fuel error - by maximthepain - 21.05.2016, 14:34

Forum Jump:


Users browsing this thread: 1 Guest(s)