I forgot how to write C-Script, so it may have some errors.

1-check if the player looks at some entity (entity_to_be_seen)
Code:
if(vec_to_screen(entity_to_be_seen.x,camera)) // if the entity is inside the camera frustum 
{
	if(c_trace(player.x,entity_to_be_seen.x,IGNORE_ME) == 0) //and if there is no obstacle between player and entity
	{
		//do something();
	}
}



2-To check whether my is above player
Code:
var temp2[3];
vec_set(temp,my.x);
vec_sub(temp, player.x);
vec_to_angle(temp2, temp);

if(vec_dist (player.x, my.x) < 200 && abs(temp2.y - 90) < 10 ) //play with 10
{
	//my is above player in distance less than 200
}




every body got some dues in life to pay