You have to use an action command to make the gun turn its light off. However, the AI will turn the light back on right away; so the only way to keep the light off is with a constant loop of "turn off light" actions. Not sure what exactly the syntax would be for that though. Search the forums, because I know someone figured this out before and posted a script to solve it. It may even be in the editors depot.