Hi...
For a car or a vehicle, JackDVS is right. Setting behaviour on stealth works fine.
For a machinegun post. It's a bit different. I've used the command action "light off". The problem is that the machine gun automatically turns on its light just after switched it off.
So I don't know how to solve this problem.
Look at the test mission. I've made a stupid script wich, with a smart loop, turns off the ligth of the mg. It works, but I think there's a more easy way to do it. It's not a good solution, because a such loop take too much memory.
Ask to advanced scripters...