Question

Здравствуйте, форумчане. У меня автомобиль включается даже при 0 литров бензина.
Автомобиль глушится при 0 литрах, но все равно запускается на команду /engn
 

	if(strcmp(cmd, "/engn", true) == 0)
	{
		if(IsPlayerInAnyVehicle(playerid))
		{
			new carid = GetPlayerVehicleID(playerid);
			new id_car = GetVehicleIdxByID(carid);
			if(!IsAVelo(carid))
			{
				if(CarEngine[carid]==0)
				{
					if(id_car != -1 && aData[id_car][aFuel] < 1) return SendClientMessage(playerid, COLOR_LIGHTRED, "В машине закончился бензин.");
					GetVehicleParamsEx(carid,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(carid,true,lights,alarm,doors,bonnet,boot,objective);
					CarEngine[carid] = 1;
				}
				else if(CarEngine[carid]==1)
				{
					GetVehicleParamsEx(carid,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(carid,false,lights,alarm,doors,bonnet,boot,objective);
					CarEngine[carid] = 0;
				}
			}
		}
		return true;

Надеюсь на вашу помощь! Спасибо..

Share this post


Link to post

0 answers to this question

There have been no answers to this question yet

Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content