Hi, this is just a little script that i made for people who like to spam their viewmodels on and off with a key, but don't want to get out of their way to press it, so i incorporated it into the wasd keys and attack.
alias +fw "+forward; r_drawviewmodel 0"
alias -fw "-forward; r_drawviewmodel 1"
bind w +fw
alias +bw "+back; r_drawviewmodel 0"
alias -bw "-back; r_drawviewmodel 1"
bind s +bw
alias +ml "+moveleft; r_drawviewmodel 0"
alias -ml "-moveleft; r_drawviewmodel 1"
bind a +ml
alias +mr "+moveright; r_drawviewmodel 0"
alias -mr "-moveright; r_drawviewmodel 1"
bind d +mr
alias +attacking "+attack; r_drawviewmodel 0; spec_next"
alias -attacking "-attack; r_drawviewmodel 1"
bind mouse1 +attacking
Just put that in your autoexec in your cfg folder, if you don't have one, then create a new document file, open it, then immediately save it as autoexec.cfg, and make it all files, then save.