Left 4 Dead 2

Left 4 Dead 2

Admin System
Help with Cvars?
Been using this addon for a while but i still don't know how to properly get Cvars to work, any help with this? Is it possible to edit the Cvars so special infected stats change without using console commands or sv_cheats 1? Thanks in advance
< >
Showing 1-2 of 2 comments
Maur0 14 Aug, 2020 @ 12:05pm 
Here is a list of all the cvars commands in the game: L4D2 Cvars List

Simply the only thing you have to do to change the cvars commands, is to put in the chatbox or in the console to change the value and modify it. Here are some examples:
Chatbox: !cvar god 1 !cvar sv_infinite_ammo 1 !cvar sv_gravity 200 !cvar z_tank_health 10000 Console: scripted_user_func cvar,god,1 scripted_user_func cvar,sv_infinite_ammo,1 scripted_user_func cvar,sv_gravity,200 scripted_user_func cvar,z_tank_health,10000

Note: To use the command "scripted_user_func" (allows to make the command invisible to other players), you have to use the commas instead of the space bar.

Another way to load the cvars commands and modify the game is to use a "cvars.txt" file and put it in the "ems / admin system" folder. This allows you to quickly activate the commands every time you start or restart the server map.

Originally posted by Rayman1103:
● 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

And so you can modify the commands without having to do it within the game.
Last edited by Maur0; 14 Aug, 2020 @ 12:07pm
Da' Crazy Woddy 15 Aug, 2020 @ 1:14pm 
Originally posted by Maur0:
Here is a list of all the cvars commands in the game: L4D2 Cvars List

Simply the only thing you have to do to change the cvars commands, is to put in the chatbox or in the console to change the value and modify it. Here are some examples:
Chatbox: !cvar god 1 !cvar sv_infinite_ammo 1 !cvar sv_gravity 200 !cvar z_tank_health 10000 Console: scripted_user_func cvar,god,1 scripted_user_func cvar,sv_infinite_ammo,1 scripted_user_func cvar,sv_gravity,200 scripted_user_func cvar,z_tank_health,10000

Note: To use the command "scripted_user_func" (allows to make the command invisible to other players), you have to use the commas instead of the space bar.

Another way to load the cvars commands and modify the game is to use a "cvars.txt" file and put it in the "ems / admin system" folder. This allows you to quickly activate the commands every time you start or restart the server map.

Originally posted by Rayman1103:
● 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

And so you can modify the commands without having to do it within the game.

Thank you so much!, You reply to every discussion and help everyone!
< >
Showing 1-2 of 2 comments
Per page: 1530 50