1st off, GET OFPR!!!! It makes ofp five times as great, and opens up a world of addons and missions. It is WELL worth the 20 bucks or so. ;D
Even with v1.46, you can still get by. Here is a simplified way to do it. Place this line of code where you need to find a unit to beat:
{if (_x distance _unit <= _range && _x != _unit) then {_found = _found + [_x]}} foreach _list
Make _range something small like 4 meters or so. The other parameters are explained in the big long code I posted. This will give you an array that holds all units from _list that are 5 meters from _unit. Then just get the first guy in that array, with _found select 0. If there is only one guy near you, that will always return that guy. If there is more than one within 4 meters or whatever, you'll basically be striking a random guy out of that group in range.
It would be possible to convert the whole function into v1.46 and plop it into your script, but for now that should work. It also would be possible to do things like check if the target is in front of the player, so he can't hit guys behind him. All of this would be easier to do with OFP:R and functions, but it is still possible in 1.46