CS has always stored the settings of a user in a file called config.cfg in the csgo/cfg folder. Opening the config with an Editor allows you to adjust a huge list of cvars, your keybindings, crosshairsettings etc etc.
Counter-Strike will automatically execute an autoexec.cfg in the abovementioned folder, if present, which then can be used to execute mulitple other scripts, typically a userconfig, where your preferred settings are stored and will upon execution overwrite the standard config.cfg. To create a cfg file, simply copy the config.cfg, empty and rename it.
Why do all this?
Once getting used to it it can be a faster way of changing your keybindings or other cvars. It might be necessary to change some cvars to create an effective training environment on a map, to gain knowledge or practice. Scripts can store these settings and instead of altering many different variables, simply 1 command sets up your localserver the way you need it.
Upon reinstallation of the game, copying your backup of the userconfig and autoexec cfg files into the csgo/cfg folder will immediatly restore the settings you last used and you are ready to join servers immediatly.
The autoexec is used to execute commands automatically on start of the game.
Buyscripts: Allow you to buy one or more items with a single buttonpress instead of opening the buy menu and misclicking on the wheel of fortune.
They work like this:
bind “key” “command”
Buy commands in CS: GO follow the simple pattern of: buy m4a1 for example. Lists of all the weapons are readily available on the web and you can create your own buyscript. If you would like one, do not have the nerves to do this, ask me and tell me how you want it set up. I will provide you one as i only have to modify my own for a couple of minutes.
Here you can change variables for offline training to fly about the map, discuss with teammates, test grenades or weapon behavior and so forth.
Another script that resets the values to standard is absolutely recommended.
For people that like their configs to look cleaned up, settings and keybindings can be separated.
Technically, the buyscript and settings can simply be included in the autoexec.cfg, but my personal preference is to keep it separate and cleaned up and not mashed together.
I will explain on my case: My autoexec contains the lines exec settings.cfg and exec userconfig.cfg which will then setup csgo to my liking. Cfgs can be also referenced over keybindings: I could setup my game to training mode with a buttonpress by e.g.: bind “m” “exec training” and bind “n” “exec endtraining” (which resets the cvars to standard value). This could also be bound to one key by using aliases and creating a togglescript:
alias start “exec training; bind m stop”
alias stop “exec endtraining; bind m start”
bind “m” “start” //executes the alias and therefore all commands related to it; immediatly rebinds the key to another alias.
The function of the key switches back and forth between the aliases on every press.