Attack2 bind question in CS GO

I'm trying to use the next bind:

bind "h" "+attack2;-attack2;+attack;-attack" 

it's supposed to be the same as pressing right mouse button and then the left one... but it just does nothing. Why?

I tried all variations already with no luck. I also tested both, autoexec (config_default actually) and a separate cfg file :( please advise.

I also noticed this line in the config_default:

bind "MOUSE1" "+attack"

so.... there is no need to use "-attack" or what?


Yes, there is not need to do -attack or -attack2 it is automatically called by Source.

You'd probably want just bind "h" "+attack;+attack2"

After binding you can do host_writeconfig to save your binds, place it in the autoexec.cfg or other CFG files in the directory.


First off, no - you don't need to bind -attack. When you release the key or button the game knows where to stop. In aliases you need to tell the game where to stop by creating a -alias and this can then be used to create custom stuff.

Theoretically your plan would work using an alias, but it doesn't.

alias +snipe "+attack2; +attack"
alias -snipe "-attack; -attack2"
bind mouse1 +snipe

Although this bind would or should work it doesn't work (probably forbidden by the devs).

You can try it out using something else. For example this one:

alias +snipe "+jump; +attack"
alias -snipe "-attack; -jump"
bind mouse1 +snipe

This actually works. Using this alias you jump when you shoot and stop jumping when you release the mouse button.

Fun fact: aliases can be used to bypass -attack and others, like using mouse1 to keep firing:

alias spray "+attack"
alias nospray "-attack"
bind mouse1 spray
bind mouse2 nospray