Use something like this in the while loop that's used by the enemy's action:

c_scan(my.x, my.pan, vector(120, 60, 1000), IGNORE_ME | SCAN_ENTS);
if (you == player)
{
// do what's needed here; the enemy has detected the player
}

The player would have to be made sensitive to scanning. 120, 60, 1000 give the angles and the scanning range - check the manual.