I've added a plugin and fixed some settings allowing you to be able to talk to your team mates only but you have to add some lines to your config.cfg file under your steam apps and steam account folder "under team fortress 2" so your navigation window should look something similar to this:
C:\Program Files\Steam\steamapps\dominatorhl2\team fortress 2\tf\cfg
or
C:\Program Files\Steam\steamapps\"YOUR ACCOUNT NAME HERE"\team fortress 2\tf\cfg
Then edit your config.cfg file with notepad++
http://downloads.sourceforge.net/notepad-plus/npp.5.0.3.Installer.exe?modtime=1217782718&big_mirror=0And modify it with this to allow you to add the lines you need to add to your config.cfg
You need to add these lines to it at the bottom of the config file:
alias +alltalk "voiceall; +voicerecord"
alias -alltalk "-voicerecord; voiceall"
bind "capslock" "+alltalk"
You can replace capslock with anykey
Also you probably will have to change the config.cfg file to a "Read Only" by right clicking the config.cfg file and select properties and by the attributes section select the Read Only check box and click "OK" *You do this because everytime value loads TF2 it only allows some keys to be binded like CAPSLOCK and it over rides the command, by changing it to a read only value cannot touch the file also meaning whatever future keys you bind through console they will not be saved and you will have to edit the config.cfg file to add them in there.*
And if you still can't get how to do this I wrote up a visual tutorial on how to do this:
Download Code Here If you didn't get them like the tutorial said