How to Make Autoexec in CS2

How to Make Autoexec in CS2

If you've played CS:GO or CS2 for a while, you've probably heard of Autoexec Config, sometimes called autoexec.cfg or even cfg. However, many players may not understand an Autoexec Config or how to create their own. 

The xplay.gg team will explain in detail how you can make an autoexec.cfg without too much effort.

Highlights

  • Detailed guide on how exactly to create and customize your own Autoexec.cfg file

Speaking of the best FPS, we wrote an article with recommendations: 7 Settings for Max FPS in CS2: Performance Guide.

What is Autoexec.cfg in Counter-Strike 2?

You can use the Autoexec.cfg file so that you don't have to re-enter all the commands manually every time you start the game. Autoexec.cfg can be modified according to your preferences, or you can find and use CS2 pro configs to play as cool as the top players.

If you install your CS2 config, you can lower ping, increase fps, change crosshair settings and mouse sensitivity, or skip the screensaver. Autoexec is the only tool that allows you to bind to keyboard shortcuts and change map settings.

How to Create an Autoexec.cfg File for CS2

Follow our instructions and don't deviate from the steps in it to succeed:

  1. Start Steam
  2. Right-click on CS2
  3. Hover over "Manage"
  4. Click "View local files"
  5. Open the "game" folder in your local files
  6. Open the "csgo" folder (the folder is still named after CS2's predecessor)
  7. Open the "cfg" folder
  1. Create a new text document
  2. Name the new document "autoexec.cfg"

You can create the file anywhere and move it to Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg.

Basic Autoexec Commands for CS2 Players

In August 2024, Valve released an update for Counter-Strike 2 that banned the use of binds and features that simplify gameplay. Therefore, we cannot advise you on relevant features. 

We have a great article that will also help you customize your game: Best CS2 Launch Options.

Crosshair Settings

We have another article on crosshairs: The Ultimate Guide to CS2 Crosshairs and Codes.

  • cl_crosshairstyle - Sets the style or shape of the crosshair.
  • cl_crosshairdot - Activates the dot in the middle of the crosshair.
  • cl_crosshairsize - Changes the size of the outer lines of the crosshair.
  • cl_crosshairthickness - Sets the crosshair thickness.
  • cl_crosshaircolor - Sets the color of the crosshair.
  • cl_crosshairgap - Adjusts the gap size in the middle of the crosshair.
  • cl_crosshairuseralpha - Adjusts the transparency of the crosshair.

On xplay.gg servers you can practice with different crosshairs to see which one is more comfortable for you. 

Optimizing ViewModel

Optimizing ViewModel settings can minimize screen clutter and improve overall visibility in the game.

  • viewmodel_fov - this command sets the field of view to the specified number. The maximum value of the field of view is 68. The default field of view is 60.
  • viewmodel_offset_x - this command sets the X-axis offset of the view model, i.e., how close or far from your character. The maximum value is 2, and the minimum value is -2.
  • viewmodel_offset_y - command sets the Y-axis offset of the view model, i.e., its distance up or down. The maximum value is 2, and the minimum value is -2.
  • viewmodel_offset_z - the command sets the Z-axis offset of the view model, i.e., its distance up or down. The maximum value is 2, and the minimum value is -2.

Other Commands

  • Performance optimization: fps_max 0, r_dynamic 0, r_drawparticles 0. 
  • Sound settings: volume 0.5, voice_scale 0.7, snd_mixahead 0.05. 
  • Network settings: rate 786432, cl_interp 0, cl_interp_ratio 1, cl_updaterate 128, cl_cmdrate 128. 

You may also find other useful commands, such as the Best CS2 Console Commands.

How to Customize Autoexec File in CS2

Now that you have your autoexec document ready, you can run your configuration:

  • Once you have entered all the commands you want to execute when you run CS2 - go back to Steam
  • Right-click on CS2
  • Click on "Properties"
  • Under "General", scroll down and find "Startup Options"
  • Type +exec autoexec.cfg in the startup options
  • Now, you can start CS2, and everything will work! 

Conclusion

Professional players use auto-execute settings to optimize their gameplay, and you can grab their configs from a unique website. However, some settings may be individual, so you may want to change them.