I am quite sure there is a predefined can_interact() function which shows if the player is in hardcore at the moment. But as far as I know it is only self referenced, Try and look in the documentation for a "IsInHardcore" function.
Also, there is no function which checks whther or not you can...