Place a 3X10 Trigger over the map bargate, Activation Blufor/Repeatedly/Present-
onAct:
(getPos thistrigger nearestObject 163575) animate ["Door_1_rot", 1];
onDeact:
(getPos thistrigger nearestObject 163575) animate ["Door_1_rot", 0];
Note: Replace the 163575 with the map id of your bargate