Commnad
#1

Код:
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
Reply
#2

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


Forum Jump:


Users browsing this thread: 2 Guest(s)