From BMW WDS,
The Hazard and Central Locking share the same ground - pin 2 (see pic below)
Here is a picture of the Hazard and Central Locking Switch remove.
Remove the switch and make a jumper from pin 5 to any part of body (like the door metal part). If the central door close or open, then you might have a grounding problem.
Here is the function of the switch pin out.
Chances as pointed out by Astro, it could be a lose connector.