You can use:
native Float:get_user_aiming(id, &target, &body, dist=9999)
It will return target id, then you use:
native get_user_team(id, team[]="", len=0);
to get team id of aimed player, and team id aiming player. If first and second team id are the same then... hmm client_print of hud_message (don't know

).