SA-MP Forums Archive
SetVehicleParamsEx - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SetVehicleParamsEx (/showthread.php?tid=470388)



SetVehicleParamsEx - MrMou6 - 17.10.2013

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...


Re: SetVehicleParamsEx - Amora187 - 17.10.2013

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

Код:
ManualVehicleEngineAndLights();



Re: SetVehicleParamsEx - MrMou6 - 17.10.2013

Thanks for this funtion, now everything works good.