The Professional Way (Scripted).
Map
-Make the door and the hinge (origin brush).
-Select both and right click. then choose script<Brushmodel
-Press n to open entity window
Add these values
Key - Targetname
Value - <doorname_#> (This can be anything, but to easily know which oor you are scripting, this format is the best. For eaxmple: FactoryDoor_01)
-Make a trigger infront of the door (This can be motion detected or Use key activated)
-Select the trigger and right click. Choose Trigger<Multiple or Trigger<Use (Multiple is the motion and use is the use

)
-Press n to open the entity window and enter these values
Key - Targetname
Value - Trig_<doorname_#> (Example: Trig_FactoryDoor_01)
-Save map and compile (No, thats not the end

)
Scripting
This will be how your scripting will look, with some help...
Main () //Always start scripting with this
{
thread Factory_Doors; //This will tell the script to run these threads (you can have more than 1)
}
Factory_Doors () //This is the thread called from above
{
FactDoor_01 = getent ("<doorname_#>","targetname"); //This gives the door a script reference
Trig_FactDoor_01 = getent ("Trig_<doorname_#>","Targetname"); //This give the trigger a reference
while (1) //Not sure what it does, but add it anyways
{
Trig_FactDoor_01 waittill ("Trigger"); //Tells the trigger to wait until activated before performing next actions
FactDoor_01 rotateto ((0, 0, 90), 1); // This will make the door rotate 90 degrees on its Z-Axis from its origin (the 1 is seconds)
FactDoor_01 waittill ("rotatedone"); //Tells the script to wait until the rotation is completed
wait (5); //Tells the script to pause
FactDoor_01 rotateto ((0, 0, 0), 1); //Rotates door back to original position
FactDoor_01 waittill ("rotatedone"); //Tells the script to wait for the rotation
}
}
Now save that as "<mapname>_doors.gsc" and put in the maps/mp folder
And if you havent already done so, you must make the main gsc.
This is pretty simple...
Just copy this format...
main()
{
ambientPlay("ambient_mp_carentan"); //Background Noise
maps\mp\_load::main();
maps\mp\<mapname>_doors::main(); //Loads the doors script
game["allies"] = "british";
game["axis"] = "german";
game["british_soldiertype"] = "airborne";
game["british_soldiervariation"] = "normal";
game["german_soldiertype"] = "fallschirmjagergrey";
game["german_soldiervariation"] = "normal";
game["attackers"] = "allies";
game["defenders"] = "axis";
}
Now save that as "<mapname>.gsc" and also put in the maps/mp folder
Now, I believe that is complete. I will provide a test map file soon.
More help from this tutorial (where I learnt this) -
Here