alias

General

Creates a custom command. Gives a name to a list of commands, so you can run them all at once or bind them to a key. An alias whose name starts with + runs when you press the key, and the matching - alias runs when you release it: this is how the jump throw bind works. Put it in your autoexec.cfg so it loads every time you start CS2.

alias prac "sv_cheats 1; sv_infinite_ammo 1; mp_buy_anywhere 1"

Syntax

alias <name> "<commands>"

Examples

alias prac "sv_cheats 1; sv_infinite_ammo 1; mp_buy_anywhere 1"
alias "+jumpthrow" "+jump;-attack;-attack2"
alias "-jumpthrow" "-jump"
bind alt "+jumpthrow"

How to use alias in CS2

  1. Enable the developer console in Settings › Game › Enable Developer Console.
  2. Press ~ to open the console, type the command and press Enter.
  3. To apply it every time you launch CS2, add the line to an autoexec.cfg file in your cfg folder.

Related commands

alias FAQ

What does alias do in CS2?

Creates a custom command. Gives a name to a list of commands, so you can run them all at once or bind them to a key. An alias whose name starts with + runs when you press the key, and the matching - alias runs when you release it: this is how the jump throw bind works. Put it in your autoexec.cfg so it loads every time you start CS2.

Does alias need sv_cheats?

No. alias works without sv_cheats, including in official matchmaking.

All CS2 console commands ›