SetLocked

// Set the locked state of oTarget, which can be a door or a placeable object. void SetLocked(object oTarget, int bLocked);