OnPlayerKeyStateChange bug
#1

Код:
	if(newkeys & KEY_ACTION && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
		new vehicle = GetPlayerVehicleID(playerid);
		GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective);
		if(lights == 0)
		{
			SetVehicleParamsEx(vehicle, engine, 1, alarm, doors, bonnet, boot, objective);
		}		
		else if(lights == 1)
		{
			SetVehicleParamsEx(vehicle, engine, 0, alarm, doors, bonnet, boot, objective);
		}
	}
This piece of code should turn the vehicle lights on when pressing the CTRL key.
For some reason, nothing happens when I press CTRL.
Why is that so?
Reply


Messages In This Thread
OnPlayerKeyStateChange bug - by danielpalade - 08.10.2016, 20:26
Re: OnPlayerKeyStateChange bug - by Luicy. - 08.10.2016, 20:54
Re: OnPlayerKeyStateChange bug - by danielpalade - 08.10.2016, 21:04

Forum Jump:


Users browsing this thread: 1 Guest(s)