Mostly, Here is a small tutorial I made using these commands.
Name setbehaviour "SAFE" <~~~ Activates Lights
Name Setbehaviour "Combat" <~~~ Deactivates lights.
Also this is the code for the light off action command.
LIGHT OFF
vehiclename action ["light Off",vehiclename]
vehiclename action ["light Off"] also works.
Vehiclename switches off its lights.
However, the light is immediately switched on again if the unit is in "SAFE" or "CARELESS" modes.
Light goes off if player is pilot, and stays off until switched on again.
M2 machinegun lights do not seem to work the same.
A loop is needed to keep it off and even that is not too satisfactory.
Thanks
Planck, but this command doesn't work, the light switches off in a split second and switches back on instantly.
That's why I used the "Setbehaviour command instead.
Hope it helps..
See attatchment below this thread.