You want your code to be executed, when the "+use" key doesn't activate ANYTHING?
What fysiks said, you can hook "Ham_Use" or a similar name, check if the hooked function was called. Another (much easier) method is to; before you check when they pushed the use key. Do a trace line (get_user_aiming) and see if there looking at a "usable" entity.
Here's the second method:
if(!(entity_get_int(id,EV_INT_button) & IN_USE && !(entity_get_int(id,EV_INT_oldbuttons) & IN_USE)))
get_user_aiming(id,Index,Body,200); // not sure how far HL checks when doing the use key
// Filter out any entity's
// I filter out other players, and "trigger_*" entity's as you cannot "+use" them
if(!equali(Classname,"player") || !(containi(Classname,"trigger_") != -1))
// Your code