Left 4 Dead 2

Left 4 Dead 2

Admin System
fRoZi 23 Mar, 2020 @ 3:15am
Problem with my cfg
I created a cfg with different commands.
Like this:

say !cvar cl_glow_ghost_infected_g 1 // 0.4 -> this value that was in the game
say !cvar cl_glow_ghost_infected_r 1 // 0.3 -> this value that was in the game
say !cvar cl_glow_infected_r 0
say !cvar cl_glow_infected_g 0.5
say !cvar cl_glow_infected_b 1
say !cvar z_ghost_delay_max 25
say !cvar z_ghost_delay_min 25

And I bind a button for this (bind *button* "exec *cfg*), but when I press this button, not all commands are show in chat and only first command show is chat. And commands are not working. I tried to play on local and in single player but it doesn't working. Can you help me? (and sorry for bad english)
Last edited by fRoZi; 23 Mar, 2020 @ 3:45am
< >
Showing 1-2 of 2 comments
Maur0 23 Mar, 2020 @ 9:00am 
You are simply doing wrong, but do not worry, this happens when it is your first time.

First: when you have created a file "autoexec.cfg" and put it in the "cfg" folder of "left 4 dead 2 / left4dead2". There you put all the commands without including the say since that will not work quickly. It's just the command and the binds.

Here is an example of mine:
bind 0 "slot10" bind t "show_menu turret" bind v "show_menu menu" bind i "sm_admin" bind c "+mouse_menu CS" bind mwheelup "+attack" bind mwheeldown "+attack" bind f1 "toggleconsole" cl_glow_infected_r 0 cl_glow_infected_g 1 cl_glow_infected_b 1 cl_glow_ghost_infected_r 1 cl_glow_ghost_infected_g 1 cl_glow_ghost_infected_b 1 cl_glow_infected_vomit_r 1 cl_glow_infected_vomit_g 0 cl_glow_infected_vomit_b 1 host_writeconfig
You must put down everything or at the beginning (as you want) this command so that it reads it: "host_writeconfig"

With this you save the file and in launch options you put "+ exec autoexec" (without the quotes).

To go to launch options:
> Right click on Left 4 Dead 2 and down everything in Properties.
> General: Set Launch Options.
> You put that command and accept.

And there, every time you start the game, the menu will automatically start all the commands in the file.

Another much easier and better method when executing commands quickly from the admin system, is with the file cvars.txt. This is simply creating a text document file and naming it cvars, and putting it in the "left 4 dead 2 / left4dead2 / ems / admin system" folder. And there the commands will be executed quickly when you start your local server.

● Using a cvars.txt File
You can create a file called "cvars.txt" and place it in the following directory:
C:\Program Files (x86)\Steam\SteamApps\common\left 4 dead 2\left4dead2\ems\admin system

This file will automatically execute all Cvars upon loading each map. Keep in mind each Cvar will need to be on its own line within the file.

Here's an example of how you can enter the Cvars:
god "1" "sv_infinite_ammo" "1" sv_gravity 200 scripted_user_func give,all,rifle_m60 scripted_user_func max_health,all,300
fRoZi 23 Mar, 2020 @ 10:10am 
Thanks!))
< >
Showing 1-2 of 2 comments
Per page: 1530 50