Code:
/* SDK function - checks if an origin is in an entity's view cone
* Set use3d to 1 to do the calculation in 3D. Otherwise it will be in 2D.
*/
native is_in_viewcone(entity, Float:origin[3], use3d = 0);
As cheap suit said, the above is for checking if the entity is within the players sight.
Code:
Float: get_user_aiming ( index, &id, &body, [ distance = 9999 ] )
If you want to check if the person is within the cross hair then use this.
To check the distance of the player you can run a trace_line.
__________________