Does not detect players in helicopters
Hello, is it possible for you to add these functions as well as remove the crouch to turn off security lights? or tell me how to do it in the code so I can remove it myself? thanks

I think i might of found the crouch option so I replaced false for true. going to see if it affects it.

// Check if player is crouched
      if (player.IsDucked() && player != light.lastAttacker)
		return true;
Sorry it has taken me so long to respond. Yeah, for detecting crouched players, just remove the section of code you have above. As for the heli targeting, my assumption would be that the light cannot "see" the player and I only allow targeting if the light has line of sight to the player. That check is probably seeing some part of the helicopter. What I can look into is allowing tracking of the helicopter. What plugin are you using to let players fly the heli?
It's all good @S0N0FBISCUIT, no worries, I have removed the plugin as no one was using it and that I removed nights on my servers, but what was happening is that when a player was mounted in any helicopter (mini or scrap), it would not detect them.