if you read the full post, would read this:
Is it possible to indicate whether a player is visible or not? Can I only aim at visible players?
No. You'd need access to the game's functions to do sight/bullet tracing which either requires injecting to writing into the game's memory.