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
#2

Press ALT gr https://sampwiki.blast.hk/wiki/Keys
--
btw;
change it to;
PHP код:
SetVehicleParamsEx(vehicleengine, !lightsalarmdoorsbonnetbootobjective); 
Reply
#3

Quote:
Originally Posted by Luicy.
Посмотреть сообщение
Press ALT gr https://sampwiki.blast.hk/wiki/Keys
--
btw;
change it to;
PHP код:
SetVehicleParamsEx(vehicleengine, !lightsalarmdoorsbonnetbootobjective); 
But LCTRL should be working too, but it ain't.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)