The answer depends on the place: the car is in a tunnel, and stopping is banned in tunnels. The ban covers any stopping; there is no exception for picking up a passenger, so you may not pull over to the person flagging you down by the wall and stop by the sidewalk. You can pick the person up only where stopping is allowed — after you leave the tunnel