PlayerHasIlluminatedNPC(ply, losDotProd)( Link ): Called when the player's flashlight is illuminating onto the NPC. This is used in certain NPCs in HL2. It would be a much better way to determine if the player is shining a flashlight onto an NPC then the current existing Lua alternatives (Which can be performance heavy and unreliable)
This relies on episodic behavior that is not present in GMod, and it doesn't really do anything special compared to what you might be doing. It's just a distance and Dot product check.
Details
PlayerHasIlluminatedNPC(ply, losDotProd)
( Link ): Called when the player's flashlight is illuminating onto the NPC. This is used in certain NPCs in HL2. It would be a much better way to determine if the player is shining a flashlight onto an NPC then the current existing Lua alternatives (Which can be performance heavy and unreliable)