i did such a thing for a group sometime ago ... (dont have it anymore):
the unit had a waypoint it should reach, on the way it looked for useable vehicles, entered one and drove the rest of the way:
i placed a trigger on the units position, checked the trigger-list for vehicles that are empty and canmove, if there was one i assigned the unit & ordergetin ... / if not ~3 (unit still moved) and run the script again (setpos of trigger on the units new position) ...