Go to the entity tab of the door (in the level editor) and type a function name in the PlayerInteractCallback box.
Jump over to your script and create the script for it. I'll name it InteractLocked in this example:
void InteractLocked(string &in asEntity)
{
if(GetSwingDoorLocked(asEntity) == true) SetMessage("MessageCategory", "MessageEntry", 3);
}
This simple script will check if the door is locked, and if so, it will display a message for 3 seconds. The message itself is written in your .lang file. Just create a category and entry and input the names of those in the SetMessage function.
PS: Make sure the box for removing the callback is unchecked in the editor.