You can use this in a weapon and then click the object to find it's name:
PHP Code:
//#CLIENTSIDE
function onFirstResponderChanges(obj) {
echo(obj.name);
}
I have a feeling there's a public function you can use to do it though, someone else will have to help you with that if there is.