U been watchin Top Gun, haven't u?
For a lock-on.. no, I'm pretty sure there isn't. One thing u can do (complex solution) - use atan2 to check direction from each enemy who can target player to player, then see if that is in fact the direction they're facing. If it is, chances are they're lockin on - or trying to. U can even put dis in a trigger.. just don't ask me about da math right now.. it's past midnight and I have a headache.
Also, eventhandler "incomingmissile" on the player.
Last of all, u can create a check.. The 'hard deck' is actually a height above sea level. OFP doesn't have that sort of check, but u can check the height above *ground* level. Just decide what ur hard deck is - say 300. So, to detect if da player is below the hard deck, make a trigger. Condition is: (getpos player select 2) < 300
make it repeatedly. If it trips, player has broken the rules of engagement by goin below hard deck.
So, make onactivation of that add a "fired" eventhandler to the unit that broke the hard deck.. if the 'fired' eventhandler triggers, the unit fired while below the hard deck.. (obviously..)
make another trigger that detects above the hard deck and removes event handlers. That's ur basic approach.
Dat's it. Sorry, no 'lock on'.