Counter-Strike 2

Counter-Strike 2

711 valoraciones
Binding Commands/Chat Messages
Por broooo y 1 colaboradores
This guide will teach you how to create binds to buy items, enter chat messages, and many other things. I will do a step by step tutorial on how binds work and how to use them. Binds in CS:GO can be used in many situations, whether it is for comedic reasons or improving efficiency in gameplay. Read and enjoy!
4
   
Premiar
Favoritos
Favorito
Quitar
Enabling the Developer Console.
Before I teach you advanced binds, I will need to teach you how to make a bind in the first place. You will need to open console, and that is done by pressing the ` key on your keyboard, it should be right to the left of the 1 key. If it doesn't open, you will need to enable it, this is done by opening CS:GO, clicking on Options > Game Settings > Enable Developer Console (~) > Yes.




This option should be at the very top of the Game Settings interface. Now that you have the console opened, you can start making binds and many other things. Your developer console will most likely have some text in it, if you want to get rid of it, just type 'clear' in the text box.




CS:GO Console Commands/Key Names.
Before you can make a bind, you will need to know some console commands, although some of these commands will not help you while making a bind, you may be able to use them in the future.
You can view a list of all of the CS:GO console commands here.

Now, you will need to learn the names of each of your keys on your keyboard. You can view a list of all the keyboard names here.

Now that you know some console commands, it's time to get started making the bind.
Making a Basic Bind.
I am going to assume you have never made a bind before, so we will start with a very simple chat message bind. These can be used to call strategies if you don't have a headset, such as binding "Rush B" to your L key. These can be useful in many other situations also. So, lets get started.

To make a chat message bind, you will have to open your developer console on CS:GO, to do this, press the ~ key on the top left of your keyboard. Now you will type this in:

bind k "say_team Rush B!"

This will bind the chat message "Rush B!" to the K key, you can do this while moving and don't need to open chat before doing so. If you want the message to be displayed to all players, and not just your teammates, type this in:

bind k "say Rush B!"

Although that wouldn't be very useful, considering the Counter-Terrorists could see this and stack the B site. Binding chat messages in public chat is only useful for comedic reasons, such as making a bind that says something like 'ACE!'. Also, you should not bind anything to keys that have stuff assigned to them already, such as the W key, that moves you forward. If you want to get rid of a bind that you messed up on, or you don't use anymore, you can type this in console:

unbind k

Replace K with the key that your bind is assigned to.

If you accidentally bind a command to a key that the game uses by default, you will probably want to rebind the original command back to the key, but what if you don't know the command? This is when the find command becomes very useful. This command is like the Google of the CS:GO console. The syntax is this: find <string>. You can type: 'find bomb' into your console and it will give you all commands with the word 'bomb' in them, this should be your output after entering the command 'find bomb':






Bind Toggle.
Here I will introduce you to the command BindToggle. This allows you to make a single bind for commands that have a true or false value (1 or 0). I will give you an example:

BindToggle f6 voice_enable

This will bind the command voice_enable 0 or 1 to the F6 function key. This will make it so if you have player voices enabled, when you push F6, it will disable all player voices, then when you want to hear player voices again, pushing F6 once more will turn them back on. There are lots of commands that use true and false values, the reason the BindToggle command is so helpful is because if it didn't exist, you would need 2 binds for true and false value commands, 1 bind to do voice_enable 1 and 1 bind to do voice_enable 0.
Increment Variable Bind.
In addition to BindToggle command, incrementvar command lets you change a variable that can have multiple values, e.g luminosity, volume, etc...

Usage: incrementvar varName minValue maxValue delta

Example with player voices volume, going from value 0 to value 1, raising value with 0.1 steps :

bind "k" "incrementvar voice_scale 0 1 0.1"


Example with player voices volume, going from value 0.1 to value 1, lowering value with 0.1 steps :

bind "k" "incrementvar voice_scale 0.1 1 -0.1"

With the last example, if you launch the game with voice_scale value set to 0.5, when you press the key you set it to, value will be lowered to 0.4
Meta Binds.
A meta-command is a special command that is doing an action (single or multiple commands) when you press the bound key, and another action when you release the key.
It is like a default +attack meta-command, but you can create your own.

You have to create 2 aliases in autoexec.cfg (or in any .cfg file, but then you need to exec it from console or from your autoexec).
Once the alias is set, you can bind the alias (the one starting with a '+') to the key you want.

Example of a simple meta-command that lets you inform your teammates that you are reloading:

autoexec.cfg
alias +reload2 "+reload; say_team Cover me while reloading" alias -reload2 "-reload"

config.cfg
bind "r" "+reload2"

The reason you need a meta command in this example is that you can't simply do following :

bind "r" "+reload; say_team Cover me while reloading"

It would never execute -reload and you would keep reloading after each shot...
Advanced Buying Binds.
These are probably the most useful binds that you can set in my opinion, although they are a bit more complicated to make. This is going to require using the feature where you can set multiple commands to 1 key. This can be done with the use a semicolon and a space. Here is an example that you can use on T side.

bind b "buy ak47; buy deagle"

This will make it so during the 20 second buying period in the buy area, when you push the B key it will buy you an AK-47 and a Desert Eagle instantly, you can expand these buy binds greatly, you can even make buy binds that buy full gear, such as a bind that buys you an AWP, armor, flashes, smokes, a Five-SeveN. I will give you an example here:

bind b "buy ak47; buy deagle; buy vest; buy vesthelm; buy hegrenade; buy smokegrenade; buy molotov"

This will buy you an AK47, Desert Eagle, Kevlar Vest and Helmet, or only Vest if you previously bought a Helmet or if you don't have enough money, a Hand Grenade, a Smoke Grenade, and a molotov, all with 1 press of a button.

Some items can't be bought through binding without knowing their name, and some of the item names aren't how they are displayed on the buy menu, for example:

bind l "buy deserteagle"

That command wouldn't work, you would need to use 'deagle' instead.

Here is a list of all of the gear you can buy at the start of rounds, and their console IDs.

Format: [name of item] - [console ID of item]

Pistols:


Glock-18 - glock or hkp2000 or usp_silencer
P2000 - glock or hkp2000 or usp_silencer
USP-S - glock or hkp2000 or usp_silencer
Dual Berettas - elite
P250 - p250
Tec-9 - tec9 or fn57
Five-SeveN - tec9 or fn57
CZ75-Auto - tec9 or fn57
Desert Eagle - deagle


Heavy:


Nova - nova
XM1014 - xm1014
Sawed-Off - mag7 (sawedoff is NOT working)
MAG-7 - mag7 (sawedoff is NOT working)
M249 - m249
Negev - negev


SMGs:


Mac-10 - mac10 or mp9
MP9 - mac10 or mp9
MP7 - mp7
UMP-45 - ump45
P90 - p90
PP-Bizon - bizon


Rifles:


Galil AR - galilar or famas
FAMAS - galilar or famas
AK47 - ak47 or m4a1 or m4a1_silencer
M4A4 - ak47 or m4a1 or m4a1_silencer
M4A1-S - ak47 or m4a1 or m4a1_silencer
SSG 08 - ssg08
SG 553 - sg556 or aug
AUG - ssg556 or aug
G3SG1 - g3sg1 or scar20
SCAR-20 - g3sg1 or scar20


Gear:


Kevlar Vest - vest
Kevlar Vest + Helmet - vesthelm
Zeus x27 - taser
Defuse Kit - defuser
Rescue kit - defuser


Grenades:


Molotov - molotov or incgrenade
Incendiary Grenade - molotov or incgrenade
Decoy Grenade - decoy
Flashbang - flashbang
High Explosive Grenade - hegrenade
Smoke Grenade - smokegrenade


Note: For the items that have 2 of the same ID, for example the molotov and incendiary grenade, having the ability to use molotov to purchase an incendiary grenade shouldn't confuse you, it just depends what side you are on, if you have a bind to purchase a molotov on CT side, it will buy the counterpart of the molotov, the incendiary grenade. As for the M4A4 and the M4A1-S, it just depends on which one you have equipped at the time.
Example of buy alias using metabinds.
Introduction

In the following example you gonna be able to buy any weapon/item with one hand using arrows and keypad.

Arrow keys will be used to change which weapon type you are buying :

  • By default keypad numbers are used to buy pistols
  • By default also Vest is on KeyPad Minus, Vest + Helmet on KeyPad Plus, Defuser is on KeyPad Enter
  • Hold LEFT arrow to buy SMGs
  • Hold DOWN arrow to buy Riffles
  • Hold RIGHT arrow to buy Heavy
  • Hold UP arrow to buy Nades

There is 5 or 6 weapons per type so aliases will only bind keypad 1 tp keypad 6

In this section all stuff gonna be detailled, and in next section you gonna find the whole script.


Buy aliases


Because we can't put quotation marks inside aliases we have to create a command each time we need to put a command with more than one argument.

We can for example do in an alias :

alias command_sample "bind r +reload"

but we can't do the following :

alias command_sample "bind F3 buy glock"

This one would only affect the command buy and not the command "buy glock"

That's why we gonna make buy alias for all weapons.
I also, in those aliases put the command 'give' so if you are training on server with sv_cheats 1 you can use what you usually use to buy, to get free weapons.



Here are buy aliases (Remember, you can find the whole script in next section) :
/// Pistols /// alias p250 "buy p250; give weapon_p250" alias deagle "buy deagle; give weapon_deagle" alias elite "buy elite; give weapon_elite" alias glock_p2000_usp "buy glock; give weapon_glock; give weapon_hkp2000; give usp_silencer" alias tec9_fiveseven "buy tec9; give weapon_tec9; give weapon_fiveseven" /// SMGs /// alias mac10_mp9 "buy mac10; give weapon_mac10; give weapon_mp9" alias mp7 "buy mp7; give weapon_mp7" alias ump45 "buy ump45; give weapon_ump45" alias p90 "buy p90; give weapon_p90" alias bizon "buy bizon; give weapon_bizon" /// HEAVY /// // ShotGuns alias nova "buy nova; give weapon_nova" alias xm1014 "buy xm1014; give weapon_xm1014" alias sawedoff_mag7 "buy sawedoff; give weapon_sawedoff; give weapon_mag7" // MachineGuns alias m249 "buy m249; give weapon_m249" alias negev "buy negev; give weapon_negev" /// RIFLES /// alias galilar_famas "buy galilar; give weapon_galilar; give weapon_famas" alias ak47_m4a1 "buy ak47; give weapon_ak47; give weapon_m4a1" alias ssg08 "buy ssg08; give weapon_ssg08" alias sg553_aug "buy sg556; give weapon_sg556; give weapon_aug" alias awp "buy awp; give weapon_awp" alias g3sg1_scar20 "buy g3sg1; give weapon_g3sg1; give weapon_scar20" //// GEAR //// alias vest "buy vest; give weapon_vest" alias vesthelm "buy vesthelm; give weapon_vesthelm" alias defuser "buy defuser; give weapon_defuser" alias taser "buy taser; give weapon_taser" alias vesthelm_vest "vest; vesthelm" //// NADES //// alias hegrenade "buy hegrenade; give weapon_hegrenade" alias flashbang "buy flashbang; give weapon_flashbang" alias smokegrenade "buy smokegrenade; give weapon_smokegrenade" alias molotov_incgrenade "buy molotov; give weapon_molotov; give weapon_incgrenade" alias decoy "buy decoy; give weapon_decoy"

Default keypad binds and static arrows binds

As i wrote at the begining, there are default binds on keypad, so here are default ones, now that we have created buy aliases :
This is how it will be saved in config.cfg, when you put such lines in autoexec.cfg, you don't need quotation marks on second argument, aka keys names.

bind "KP_END" "p250" bind "KP_DOWNARROW" "elite" bind "KP_PGDN" "deagle" bind "KP_LEFTARROW" "tec9_fiveseven" bind "KP_5" "glock" bind "KP_RIGHTARROW" taser bind "KP_RIGHTARROW" "taser" bind "KP_MINUS" "vest" bind "KP_PLUS" "vesthelm_vest" bind "KP_ENTER" "defuser"

And last binds are meta commands i gonna create after :

bind "UPARROW" "+nades" bind "LEFTARROW" "+smgs" bind "DOWNARROW" "+riffles" bind "RIGHTARROW" "+heavy"

Metabinds aliases

Now that we have create all needed stuff and bound default keys (was the biggest part), we just have to create 4 metacommands that gonna re-bind keypad number when you hold the key, and reset keypad numbers with default binds when you release the key.

First we gonna create the reset alias, because we gonna need it in the 4 other aliases :

alias KP_PISTOLS "bind KP_END p250; bind KP_DOWNARROW elite; bind KP_PGDN deagle; bind KP_LEFTARROW tec9_fiveseven; bind KP_5 glock; bind KP_RIGHTARROW taser"
This is basically the same that we put in config.cfg but done in one line.

As some weapons types have only 5 items, we gonna create a fake command that does nothing, so we can bind it on keypad 6 (KP_RIGHTARROW) to prevent from buying something we wouldn't want to buy.

alias crap "" // do nothing


Now do our first alias, the SMGs one :

alias +smgs "bind KP_END mac10_mp9; bind KP_DOWNARROW mp7; bind KP_PGDN ump45; bind KP_LEFTARROW p90; bind KP_5 bizon; bind KP_RIGHTARROW crap" alias -smgs "KP_PISTOLS"

So when we press LEFT arrow, keypad 0 to 5 are now bound with SMGs buy aliases.
Release it and keypad numbers are reset with pistols buy aliases.

Do the same with riffles, heavy and nades :

alias -riffles "bind KP_END galilar_famas; bind KP_DOWNARROW ak47_m4a1; bind KP_PGDN sg553_aug; bind KP_LEFTARROW ssg08; bind KP_5 awp; bind KP_RIGHTARROW g3sg1_scar20" alias +riffles "KP_PISTOLS" alias -heavy "bind KP_END nova; bind KP_DOWNARROW xm1014; bind KP_PGDN sawedoff_mag7; bind KP_LEFTARROW m249; bind KP_5 negev; bind KP_RIGHTARROW crap" alias +heavy "KP_PISTOLS" alias -nades "bind KP_END hegrenade; bind KP_DOWNARROW flashbang; bind KP_PGDN smokegrenade; bind KP_LEFTARROW molotov_incgrenade; bind KP_5 decoy; bind KP_RIGHTARROW crap" alias +nades "KP_PISTOLS"


Whole script in next section.
Whole buy alias :
config.cfg :
bind "KP_END" "p250" bind "KP_DOWNARROW" "elite" bind "KP_PGDN" "deagle" bind "KP_LEFTARROW" "tec9_fiveseven" bind "KP_5" "glock" bind "KP_RIGHTARROW" taser bind "KP_RIGHTARROW" "taser" bind "KP_MINUS" "vest" bind "KP_PLUS" "vesthelm_vest" bind "KP_ENTER" "defuser" bind "UPARROW" "+nades" bind "LEFTARROW" "+smgs" bind "DOWNARROW" "+riffles" bind "RIGHTARROW" "+heavy"

autoexec.cfg :
//// Buy aliases + give when training with sv_cheats 1 //// /// Pistols /// alias p250 "buy p250; give weapon_p250" alias deagle "buy deagle; give weapon_deagle" alias elite "buy elite; give weapon_elite" alias glock_p2000_usp "buy glock; give weapon_glock; give weapon_hkp2000; give usp_silencer" alias tec9_fiveseven "buy tec9; give weapon_tec9; give weapon_fiveseven" /// SMGs /// alias mac10_mp9 "buy mac10; give weapon_mac10; give weapon_mp9" alias mp7 "buy mp7; give weapon_mp7" alias ump45 "buy ump45; give weapon_ump45" alias p90 "buy p90; give weapon_p90" alias bizon "buy bizon; give weapon_bizon" /// HEAVY /// // ShotGuns alias nova "buy nova; give weapon_nova" alias xm1014 "buy xm1014; give weapon_xm1014" alias sawedoff_mag7 "buy sawedoff; give weapon_sawedoff; give weapon_mag7" // MachineGuns alias m249 "buy m249; give weapon_m249" alias negev "buy negev; give weapon_negev" /// RIFLES /// alias galilar_famas "buy galilar; give weapon_galilar; give weapon_famas" alias ak47_m4a1 "buy ak47; give weapon_ak47; give weapon_m4a1" alias ssg08 "buy ssg08; give weapon_ssg08" alias sg553_aug "buy sg556; give weapon_sg556; give weapon_aug" alias awp "buy awp; give weapon_awp" alias g3sg1_scar20 "buy g3sg1; give weapon_g3sg1; give weapon_scar20" //// GEAR //// alias vest "buy vest; give weapon_vest" alias vesthelm "buy vesthelm; give weapon_vesthelm" alias defuser "buy defuser; give weapon_defuser" alias taser "buy taser; give weapon_taser" alias vesthelm_vest "vest; vesthelm" //// NADES //// alias hegrenade "buy hegrenade; give weapon_hegrenade" alias flashbang "buy flashbang; give weapon_flashbang" alias smokegrenade "buy smokegrenade; give weapon_smokegrenade" alias molotov_incgrenade "buy molotov; give weapon_molotov; give weapon_incgrenade" alias decoy "buy decoy; give weapon_decoy" //// Default binds //// alias KP_PISTOLS "bind KP_END p250; bind KP_DOWNARROW elite; bind KP_PGDN deagle; bind KP_LEFTARROW tec9_fiveseven; bind KP_5 glock; bind KP_RIGHTARROW taser" alias crap "" // do nothing //// Meta SMGs //// alias +smgs "bind KP_END mac10_mp9; bind KP_DOWNARROW mp7; bind KP_PGDN ump45; bind KP_LEFTARROW p90; bind KP_5 bizon; bind KP_RIGHTARROW crap" alias -smgs "KP_PISTOLS" //// Meta Riffles //// alias -riffles "bind KP_END galilar_famas; bind KP_DOWNARROW ak47_m4a1; bind KP_PGDN sg553_aug; bind KP_LEFTARROW ssg08; bind KP_5 awp; bind KP_RIGHTARROW g3sg1_scar20" alias +riffles "KP_PISTOLS" //// Meta Heavy alias -heavy "bind KP_END nova; bind KP_DOWNARROW xm1014; bind KP_PGDN sawedoff_mag7; bind KP_LEFTARROW m249; bind KP_5 negev; bind KP_RIGHTARROW crap" alias +heavy "KP_PISTOLS" //// Meta Nades alias -nades "bind KP_END hegrenade; bind KP_DOWNARROW flashbang; bind KP_PGDN smokegrenade; bind KP_LEFTARROW molotov_incgrenade; bind KP_5 decoy; bind KP_RIGHTARROW crap" alias +nades "KP_PISTOLS"
Binds/Aliases samples
Switch +jump & invnext on mwheel down

autoexec.cfg :
alias mwheelToggle_kz "alias mwheelToggle mwheelToggle_FFA; bind MWHEELDOWN +jump" alias mwheelToggle_FFA "alias mwheelToggle mwheelToggle_kz; bind MWHEELDOWN invnext" mwheelToggle_FFA // put mwheelToggle_kz instead if you mainly play kz

config.cfg :
bind "k" "mwheelToggle"


-----------------------------------------------------------------------------------------------------------------------------

To be continued...
296 comentarios
Francuz 17 SEP 2023 a las 11:54 
How to create command /tac like Faceit,if player type /tac in chat match has been paused
GoldTistic 2 JUL 2023 a las 20:01 
NEVERMIND!!! *for anyone else wondering, just do (parentheses only for the command bind) "
bind <key> "say" "
GoldTistic 2 JUL 2023 a las 19:59 
so question, lets say i dont want to open my settings... how to i rebind the key to open all chat?
PENE DESQUICIADO 22 FEB 2023 a las 13:26 
thank you for this thread
Kaa_S 29 MAY 2022 a las 13:05 
Thanx you, verry nice article
Acz 14 AGO 2021 a las 18:45 
@ConnorMcLeod

ty
ConnorMcLeod  [autor] 12 AGO 2021 a las 12:39 
@Acz

Create file ent_fire.cfg (or name you like) and put in it :
ent_fire weapon_knife addoutput "classname weapon_knifegg"

Then do

bind j "give weapon_knife_butterfly; exec ent_fire.cfg"
eyah 28 MAY 2021 a las 23:17 
How do i Bind v to viewmodel_fov 120 i do (bind v "viewmodel fov 120") and it wont work
Acz 9 MAY 2021 a las 4:39 
bro how to bind knife commands?
i tried
-------------------------------------------------------------------------------------------------------------
bind "J" give weapon_knife_butterfly;ent_fire weapon_knife addoutput "classname weapon_knifegg"

-------------------------------------------------------------------------------------------------------------

I guess it's because of the two quotes..
hops 🕉 23 MAR 2021 a las 12:14 
how can i bind alt to weapon slot1/primary weapon?