Hey, Adrian, Maybe I can help you with the lock_on code, because I've got it working after some initial problems. The things that are inportant are;
You have to put this line "function scan_event;" on top of your script.
Secondly you have to place the object( in wed) you want to lock on, after you place and assign the player action to a model. Otherwise the lock_on target won't regonise the player and you get a error. I think you can also solve this problem in your script with "prog_late", but I don't know for sure.
Hope this will help you.