SetVehicleParamsEx
#1

Hello, i made car panel with GUI window:
Код:
ShowPlayerDialog(playerid, 10, DIALOG_STYLE_LIST, "Car Panel", "Engine (Turn ON/OFF) \nLights (Turn ON/OFF)", "Select", "Exit");
Код:
if(dialogid == 10) // car panel
	{
		new carid = GetPlayerVehicleID(playerid);

	    if(response)
	    {
			if (listitem == 0)
	        {
	     		GetVehicleParamsEx(carid, engine, lights, alarm, doors, bonnet, boot, objective);
	     		if(engine)	SetVehicleParamsEx(carid, 0, lights, alarm, doors, bonnet, boot, objective);
	     		if(!engine) SetVehicleParamsEx(carid, 1, lights, alarm, doors, bonnet, boot, objective);
	     	}
	        if (listitem == 1)
	        {
	     		GetVehicleParamsEx(carid, engine, lights, alarm, doors, bonnet, boot, objective);
	     		if(lights)	SetVehicleParamsEx(carid, engine, 0, alarm, doors, bonnet, boot, objective);
	     		if(!lights) SetVehicleParamsEx(carid, engine, 1, alarm, doors, bonnet, boot, objective);
			}
		}
		return 1;
	}
And everythink with engine is OK. But failed with lights. When i be in car and try turn on light, it just not turning on...
Reply
#2

Maybe you are in the morning, try using this on gamemode init:

Код:
ManualVehicleEngineAndLights();
Reply
#3

Thanks for this funtion, now everything works good.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)