That's i,possible, if I'm right, unless you fiddle with the source code...
You can do it, but not when you double click the key in the inventory.
Example 1, in this case, the message shows up when you interact with the door:
void OnStart()
{
SetEntityPlayerInteractCallback("Door", "InteractDoor", false);
}
void InteractDoor(string &in asEntity)
{
if(HasItem("Door_Key_1") == true){
SetMessage("Category", "MessageThatSaysUseKeyOnDoor");
}
else
{
//Do nothing
}
}
Example 2, in this case the message shows up if the player has the key and approaches the door:
void OnStart()
{
AddEntityCollideCallback("Player", "CollideDoorArea", "CollideDoor", 0, 1);
}
void CollideDoor(string &in asParent, string &in asChild, int alState)
{
if(HasItem("Door_Key_1") == true){
SetMessage("Category", "MessageThatSaysUseKeyOnDoor");
}
else
{
}
}