If you will turn the viewmodels off/on, let's say that you want your melee to be visible and scatter and pistol hidden, you may do this.
1) Open your scout.cfg(or which ever class you want to do this on)
2)
bind "[button1]" "slot1; r_drawviewmodel 0
bind "[button2]" "slot2; r_drawviewmodel 0
bind "[button3]" "slot3; r_drawviewmodel 1
Put this in the cfg, and in the button slot put what ever button you use for your primary(slot1)/secondary(slot2)/melee(slot3).(I think for spy and engineer use more then 3 slots or what ever so you can expand it, but I don't play those classes.)