bind q "switcher"

alias equip_m "slot3;r_drawviewmodel 1;alias equip_invprev equip_s2m;alias equip_invnext equip_p2m;cl_crosshair_blue [0-255]; cl_crosshair_green [0-255]; cl_crosshair_red [0-255];cl_crosshair_file "[crosshair file]";cl_crosshair_scale [crosshair scale]"

alias equip_m2p "equip_m;alias switcher equip_p2m;bind 2 equip_s2m;bind 3 equip_m;bind 1 equip_p2m"
alias equip_m2s "equip_m;alias switcher equip_s2m;bind 2 equip_s2m;bind 3 equip_m;bind 1 equip_p2m"

alias equip_p "slot1;view_toggle;alias equip_invprev equip_m2p;alias equip_invnext equip_s2p;cl_crosshair_blue [0-255]; cl_crosshair_green [0-255]; cl_crosshair_red [0-255];cl_crosshair_file "[crosshair file]";cl_crosshair_scale [crosshair scale]"

alias equip_p2s "equip_p;alias switcher equip_s2p;bind 2 equip_s2p;bind 3 equip_m2p;bind 1 equip_p"
alias equip_p2m "equip_p;alias switcher equip_m2p;bind 2 equip_s2p;bind 3 equip_m2p;bind 1 equip_p"

alias equip_s "slot2;view_toggle;alias equip_invprev equip_p2s;alias equip_invnext equip_m2s;cl_crosshair_blue [0-255]; cl_crosshair_green [0-255]; cl_crosshair_red [0-255];cl_crosshair_file "[crosshair file]";cl_crosshair_scale [crosshair scale]"

alias equip_s2m "equip_s;alias switcher equip_m2s;bind 2 equip_s;bind 3 equip_m2s;bind 1 equip_p2s"
alias equip_s2p "equip_s;alias switcher equip_p2s;bind 2 equip_s;bind 3 equip_m2s;bind 1 equip_p2s"

equip_p2s
bind MWHEELUP "equip_invprev"
bind MWHEELDOWN "equip_invnext"

//This part below is optional and will allow you to toggle the viewmodel state of your weapons from on to off.
 
//In the three different aliases (equip_p, equip_m, and equip_s) you'll notice that there is either a command 

//that says "r_drawviewmodel 1" or "view_toggle". If you put "view_toggle" instead of "r_drawviewmodel 1", that 

//slot (primary, melee, or secondary) will have its viewmodels turned off by default. If you remove the 

//"view_toggle" and the "r_drawviewmodel 1" then you will disable the feature of turning on/off viewmodels 

//entirely. If you put "r_drawviewmodel 1" instead of "view_toggle" the weapon will always have its viewmodel

//on unless you change it manually (through another bind or via the console). If you press the button you

//bound "viewmodel_toggle" to, it will play a noise and make all the slots that have "view_toggle" on them

//have their viewmodels turned on. If you press it again it will revert them back to being off.

alias "viewmodel_on" "r_drawviewmodel 1;alias weapon_toggle "weapon_off";alias view_toggle "r_drawviewmodel 1";alias viewmodel_toggle "viewmodel_off";play HL1/fvox/boop.wav; echo "Viewmodels On""

alias "viewmodel_off" "r_drawviewmodel 0;alias weapon_toggle "weapon_on";alias view_toggle "r_drawviewmodel 0";alias viewmodel_toggle "viewmodel_on";echo "Viewmodels Off""

alias "viewmodel_toggle" "viewmodel_on"
bind "[button to bind to]" "viewmodel_toggle"

viewmodel_off