private vehicle veh;
veh = World.GetClosestVehicle(Player.Character.Position, 3f); // Parameter1 is the position, Parameter2 is the maximum distance to find a Vehicle.
if (veh != null) //Ensures that the game found a vehicle
GTA.Native.Function.Call("OPEN_CAR_DOOR", veh, 0); // Parameter1 is the Vehicle Handle, Parameter2 is the Door ID
Door ID Parameters can be found hereGTAModding.com - DOOR ID'S