Counter-Strike 2

Counter-Strike 2

View Stats:
ClockTower Jun 21, 2015 @ 2:14pm
Multiple console commands
Hi, I was wondering if there is anyway to input multiple commands into the developer console at the same time and have them all execute.

For example:
viewmodel_fov 68
viewmodel_offset_z -2
viewmodel_offset_y 2
viewmodel_offset_x 2
Last edited by ClockTower; Jan 25, 2016 @ 10:28am
Originally posted by Cynix:
Separate them with a ; - like this:
viewmodel_fov 68; viewmodel_offset_z -2; viewmodel_offset_y 2; viewmodel_offset_x 2
< >
Showing 1-15 of 15 comments
fluffy Jun 21, 2015 @ 2:20pm 
Create a .cfg file (ex. viewmodel.cfg), put those lines in the cfg file, and execute it in console: exec viewmodel

Edit: If you want it to execute at startup, create a file called autoexec.cfg and put the commands in there. It will execute on startup.
Last edited by fluffy; Jun 21, 2015 @ 2:21pm
The author of this thread has indicated that this post answers the original topic.
Cynix Jun 21, 2015 @ 2:21pm 
Separate them with a ; - like this:
viewmodel_fov 68; viewmodel_offset_z -2; viewmodel_offset_y 2; viewmodel_offset_x 2
ClockTower Jun 22, 2015 @ 9:37am 
Originally posted by Cynix:
Separate them with a ; - like this:
viewmodel_fov 68; viewmodel_offset_z -2; viewmodel_offset_y 2; viewmodel_offset_x 2
Thanks, this worked perfectly! Just what I was after.
Last edited by ClockTower; Sep 9, 2018 @ 8:06am
+{ Razzツ Mar 10, 2017 @ 1:06pm 
Originally posted by ducky:
Separate them with a ; - like this:
viewmodel_fov 68; viewmodel_offset_z -2; viewmodel_offset_y 2; viewmodel_offset_x 2
Damn Daniel! Thank you so much!! <3
property Oct 11, 2017 @ 5:43pm 
What if your command is too long to execute? like: cl_crosshair_drawoutline "1"
cl_crosshair_dynamic_maxdist_splitratio "0.35"
cl_crosshair_dynamic_splitalpha_innermod "1"
cl_crosshair_dynamic_splitalpha_outermod "0.5"
cl_crosshair_dynamic_splitdist "7"
cl_crosshair_outlinethickness "1"
cl_crosshair_sniper_show_normal_inaccuracy "0"
cl_crosshair_sniper_width "4"
cl_crosshair_t "0"
cl_crosshairalpha "200"
cl_crosshaircolor "4"
cl_crosshaircolor_b "50"
cl_crosshaircolor_g "250"
cl_crosshaircolor_r "50"
cl_crosshairdot "0"
cl_crosshairgap "-1"
cl_crosshairgap_useweaponvalue "0"
cl_crosshairscale "0"
cl_crosshairsize "3"
cl_crosshairstyle "5"
cl_crosshairthickness "1"
cl_crosshairusealpha "1"
cl_fixedcrosshairgap "-4.5"
JMC Dec 16, 2017 @ 7:26am 
Originally posted by swoopae:
What if your command is too long to execute? like: cl_crosshair_drawoutline "1"
cl_crosshair_dynamic_maxdist_splitratio "0.35"
cl_crosshair_dynamic_splitalpha_innermod "1"
cl_crosshair_dynamic_splitalpha_outermod "0.5"
cl_crosshair_dynamic_splitdist "7"
cl_crosshair_outlinethickness "1"
cl_crosshair_sniper_show_normal_inaccuracy "0"
cl_crosshair_sniper_width "4"
cl_crosshair_t "0"
cl_crosshairalpha "200"
cl_crosshaircolor "4"
cl_crosshaircolor_b "50"
cl_crosshaircolor_g "250"
cl_crosshaircolor_r "50"
cl_crosshairdot "0"
cl_crosshairgap "-1"
cl_crosshairgap_useweaponvalue "0"
cl_crosshairscale "0"
cl_crosshairsize "3"
cl_crosshairstyle "5"
cl_crosshairthickness "1"
cl_crosshairusealpha "1"
cl_fixedcrosshairgap "-4.5"
Don't execute them all at once, execute only a few at a time
retr0_spektro1d Sep 8, 2018 @ 12:46am 
Is it possible to execute more .cfg files at 1 command ?
Because i want to have a multicrosshair when i am changing to weapon
Example : Rifle, Pistol, Knife, Grenade weapon type
T4ctical Dec 19, 2018 @ 12:59pm 
Originally posted by ✰FR4GM3N:
Is it possible to execute more .cfg files at 1 command ?
Because i want to have a multicrosshair when i am changing to weapon
Example : Rifle, Pistol, Knife, Grenade weapon type

if you make an alias it is possible. for example:
you have 3 configs; crosshair1, crosshair2, crosshair3.
put in this command

alias multicrosshair "exec crosshair1; exec crosshair2; exec crosshair3"

this will make a command called multicrosshair and execute all those configs at once.

so after this just put "multicrosshair" in the console and thats it :)
Lindo [EN][ES] Dec 19, 2018 @ 1:07pm 
You can create a config.cfg file and use auto exec to load every single time you open the game.
You can bind those console commands in a single button using " ; " to add a new command.
retr0_spektro1d Dec 19, 2018 @ 11:13pm 
So if you make an alias, you can use buttons to instantly choose your crosshair inmatch like movement or such? It would make sense
T4ctical Dec 20, 2018 @ 7:33am 
Originally posted by ✰FR4GM3N:
So if you make an alias, you can use buttons to instantly choose your crosshair inmatch like movement or such? It would make sense

Yes, if you make an alias you can just create your own commands to do multiple commands at once. but to change your crosshair there are multiple ways to do so. For example you can just change the color for different slots easily without actually making an alias or config. You can also make an alias and third but not least you can make a config. (Bonus: make an alias to execute a config)

Let's start with the easy crosshair changes. These are examples to change only the color, but it can give you a good insight of the other possibilities as well:

bind "1" "slot1; cl_crosshaircolor 1"
bind "2" "slot2; cl_crosshaircolor 2"
bind "3" "slot3; cl_crosshaircolor 3"
etc

You can also make an alias to use more commands or just tidy things up:

alias crosshair1 "slot1; cl_crosshaircolour 1"
alias crosshair2 "slot2; cl_crosshaircolour 2"
alias crosshair3 "slot3; cl_crosshaircolour 3"

This makes a command called crosshair1 and it will execute both "slot1" and "cl_crosshaircolor 1" at the same time. So now you have to bind "crosshair1" to 1:

bind "1" "crosshair1"
bind "2" "crosshair2"
bind "3" "crosshair3"

To use a whole lot of commands that can't really fit in the CS:GO console you will have to make a config and put it in the right folder on your pc. I'm not gonna explain how to make a config file right now though. But basically you can use a whole lot of commands without an actual limit by making a config file and putting all those wished commands in that folder underneath each other. I'll call these files "crosshair1", "crosshair2" and "crosshair3" Then make a simple bind to the slots like this:

bind "1" "slot1; exec crosshair1"
bind "2" "slot2; exec crosshair2"
bind "3" "slot3; exec crosshair3"

Bonus!
Of course you can also make an alias to use execute those configs and go to the wished weapon slot by making an alias. Let's say we have the same configs as above and we're gonna make an alias to use those and go to the weapon slot:

alias crosshair1 "slot1; exec crosshair1"
alias crosshair1 "slot2; exec crosshair2"
alias crosshair1 "slot3; exec crosshair3"

And then bind the numbers to the right alias:

bind "1" "crosshair1"
bind "2" "crosshair2"
bind "3" "crosshair3"

This will bind 1, 2 and 3 to the alias we made to go to the slot that we want and also execute a full crosshair config.

Hope this helps! :)

Here is also a full config of my crosshair to use as practice:

cl_crosshair_drawoutline 1.000000
cl_crosshair_dynamic_maxdist_splitratio 0.0
cl_crosshair_dynamic_splitalpha_innermod 1
cl_crosshair_dynamic_splitalpha_outermod 0.300000
cl_crosshair_dynamic_splitdist 5
cl_crosshair_outlinethickness 0.500000
cl_crosshair_sniper_show_normal_inaccuracy 0
cl_crosshair_sniper_width 1
cl_crosshair_t 0.000000
cl_crosshairalpha 255.000000
cl_crosshaircolor 1.000000
cl_crosshaircolor_b 0.000000
cl_crosshaircolor_g 255.000000
cl_crosshaircolor_r 0.000000
cl_crosshairdot 0.000000
cl_crosshairgap -2.000000
cl_crosshairgap_useweaponvalue 0
cl_crosshairscale 600
cl_crosshairsize 3.500000
cl_crosshairstyle 4.000000
cl_crosshairthickness 1.000000
cl_crosshairusealpha 1
cl_fixedcrosshairgap -15.000000

You can just paste this into a config file and it will execute this crosshair when you type "exec <filename>" or use the above instructions.
retr0_spektro1d Dec 20, 2018 @ 9:23am 
Originally posted by TacticalYeet:
Originally posted by ✰FR4GM3N:
So if you make an alias, you can use buttons to instantly choose your crosshair inmatch like movement or such? It would make sense

Yes, if you make an alias you can just create your own commands to do multiple commands at once. but to change your crosshair there are multiple ways to do so. For example you can just change the color for different slots easily without actually making an alias or config. You can also make an alias and third but not least you can make a config. (Bonus: make an alias to execute a config)

Let's start with the easy crosshair changes. These are examples to change only the color, but it can give you a good insight of the other possibilities as well:

bind "1" "slot1; cl_crosshaircolor 1"
bind "2" "slot2; cl_crosshaircolor 2"
bind "3" "slot3; cl_crosshaircolor 3"
etc

You can also make an alias to use more commands or just tidy things up:

alias crosshair1 "slot1; cl_crosshaircolour 1"
alias crosshair2 "slot2; cl_crosshaircolour 2"
alias crosshair3 "slot3; cl_crosshaircolour 3"

This makes a command called crosshair1 and it will execute both "slot1" and "cl_crosshaircolor 1" at the same time. So now you have to bind "crosshair1" to 1:

bind "1" "crosshair1"
bind "2" "crosshair2"
bind "3" "crosshair3"

To use a whole lot of commands that can't really fit in the CS:GO console you will have to make a config and put it in the right folder on your pc. I'm not gonna explain how to make a config file right now though. But basically you can use a whole lot of commands without an actual limit by making a config file and putting all those wished commands in that folder underneath each other. I'll call these files "crosshair1", "crosshair2" and "crosshair3" Then make a simple bind to the slots like this:

bind "1" "slot1; exec crosshair1"
bind "2" "slot2; exec crosshair2"
bind "3" "slot3; exec crosshair3"

Bonus!
Of course you can also make an alias to use execute those configs and go to the wished weapon slot by making an alias. Let's say we have the same configs as above and we're gonna make an alias to use those and go to the weapon slot:

alias crosshair1 "slot1; exec crosshair1"
alias crosshair1 "slot2; exec crosshair2"
alias crosshair1 "slot3; exec crosshair3"

And then bind the numbers to the right alias:

bind "1" "crosshair1"
bind "2" "crosshair2"
bind "3" "crosshair3"

This will bind 1, 2 and 3 to the alias we made to go to the slot that we want and also execute a full crosshair config.

Hope this helps! :)

Here is also a full config of my crosshair to use as practice:

cl_crosshair_drawoutline 1.000000
cl_crosshair_dynamic_maxdist_splitratio 0.0
cl_crosshair_dynamic_splitalpha_innermod 1
cl_crosshair_dynamic_splitalpha_outermod 0.300000
cl_crosshair_dynamic_splitdist 5
cl_crosshair_outlinethickness 0.500000
cl_crosshair_sniper_show_normal_inaccuracy 0
cl_crosshair_sniper_width 1
cl_crosshair_t 0.000000
cl_crosshairalpha 255.000000
cl_crosshaircolor 1.000000
cl_crosshaircolor_b 0.000000
cl_crosshaircolor_g 255.000000
cl_crosshaircolor_r 0.000000
cl_crosshairdot 0.000000
cl_crosshairgap -2.000000
cl_crosshairgap_useweaponvalue 0
cl_crosshairscale 600
cl_crosshairsize 3.500000
cl_crosshairstyle 4.000000
cl_crosshairthickness 1.000000
cl_crosshairusealpha 1
cl_fixedcrosshairgap -15.000000

You can just paste this into a config file and it will execute this crosshair when you type "exec <filename>" or use the above instructions.

thank you so much mister I'm gonna make a updated version of my multicrosshair guide real thanks again have a good day
T4ctical Dec 21, 2018 @ 2:37am 
Originally posted by ✰FR4GM3N:
Originally posted by TacticalYeet:
thank you so much mister I'm gonna make a updated version of my multicrosshair guide real thanks again have a good day

No problem and thanks for appreciating it! Took me a while to make this comment :)
LLAZY DK Sep 25, 2020 @ 10:12am 
where do i need to place the file, in order to be able to call it?
KpRr~ Jul 20, 2024 @ 12:30pm 
Originally posted by Cynix:
Separate them with a ; - like this:
viewmodel_fov 68; viewmodel_offset_z -2; viewmodel_offset_y 2; viewmodel_offset_x 2

Thank you very much, now I can execute bhop commands quickly rather than individually
< >
Showing 1-15 of 15 comments
Per page: 1530 50

Date Posted: Jun 21, 2015 @ 2:14pm
Posts: 15