Jump to content
Shelter282

How to edit lights in the car

Recommended Posts

Hello guys, maybe it is a sillly question but how to disable lights in the car? I want to have one car with only 1 front light working and the second one without any lights avilable. This must be possible because I can do it manually by shooting the lamps but this is not the way how I want it to work ( i need a command or script). Please help me :)

Share this post


Link to post
Share on other sites

Turn out all lights of a vehicle...

{
	if ( _x select[ 0, 6 ] == "#light" ) then {
		_vehicle setHitIndex[_forEachIndex,1];
	};
}forEach (getAllHitPointsDamage _vehicle select 0);

 

Turn out all lights except front left...

{
	if ( _x select[ 0, 6 ] == "#light" && { !( _x select[ 7, 2 ] == "l" ) } ) then {
		cursorObject setHitIndex[_forEachIndex,1];
	};
}forEach (getAllHitPointsDamage cursorObject select 0);

 

Tested on a hunter. Does not seem to effect brake lights.

  • Like 7

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×