SA-MP Forums Archive
Commnad - 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: Commnad (/showthread.php?tid=648283)



Commnad - kadirbnm - 19.01.2018

Код:
public FarKontrol(playerid)
{
	new rows = cache_num_rows();
	new vid = GetPlayerVehicleID(playerid);
	if(rows)
	{
     	new engine,lights,alarm,doors,bonnet,boot,objective;
		GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
		if(lights == 0)
		{
        	GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective);
			SetVehicleParamsEx(vid, engine, 1, alarm, doors, bonnet, boot, objective);
        	SendClientMessage(playerid, -1, "test12w3");
        	printf("%s", lights);
		}
		else
		{
	  		GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective);
			SetVehicleParamsEx(vid, engine, 0, alarm, doors, bonnet, boot, objective);
	  		SendClientMessage(playerid, -1, "test");
	  		printf("%s", lights);
		}
	}
	return 1;
}
what is wrong, lights are not turned on


Re: Commnad - kadirbnm - 19.01.2018

problem is solved. I was not using the ManualVehicleEngineAndLights () function.