alias shadowon "r_shadows 1; alias toggleshadow shadowoff"
alias shadowoff "r_shadows 0; alias toggleshadow shadowon"
alias toggleshadow shadowon
bind r toggleshadow
Press R to toggle on/off. Works with no problems for me, rebind the R button to anything you like.