Left 4 Dead 2

Left 4 Dead 2

Admin System
High Quality Sep 28, 2020 @ 8:17pm
Are V Scripts ALWAYS reset each chapter?
Before The Last Stand update,commands would stay the same.Now I have to activate them every chapter now.Is there a way for them to stay the same every chapter?Or did the new update make resets every chapter?
< >
Showing 1-3 of 3 comments
Maur0 Sep 29, 2020 @ 1:12pm 
This is part of what Valve has done and Rayman1103 (TLS Update Leader) had said about it:
Originally posted by Rayman1103:
That was a change Valve made so Cvars set via script will get reverted back to their previous value. I'll look into coding an automated system that re-enters the Cvars back at the start of each map.

Therefore you will need a "cvars" file to save the changed commands. Here an example like:
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

This also affected my Admin Menu 2.0, leaving the method of changing the game mode not working by changing the map. Example, change from coop to versus, change map and it returns to coop. We will have to wait when they update allowing to prevent the commands from being restarted.

In the meantime, using sm_cvar in Sourcemod, prevents them from not restarting when loading a map.
Senpaija Oct 1, 2020 @ 1:52am 
Originally posted by Maur0:
This is part of what Valve has done and Rayman1103 (TLS Update Leader) had said about it:
Originally posted by Rayman1103:
That was a change Valve made so Cvars set via script will get reverted back to their previous value. I'll look into coding an automated system that re-enters the Cvars back at the start of each map.

Therefore you will need a "cvars" file to save the changed commands. Here an example like:
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

This also affected my Admin Menu 2.0, leaving the method of changing the game mode not working by changing the map. Example, change from coop to versus, change map and it returns to coop. We will have to wait when they update allowing to prevent the commands from being restarted.

In the meantime, using sm_cvar in Sourcemod, prevents them from not restarting when loading a map.

This doesn't even work, it still gets reset
Maur0 Oct 1, 2020 @ 12:54pm 
@Senpaija - It works perfectly for me, even having the "cvars" file with all the commands changed and saved. Every time the map is changed it keeps the commands as they were in the file, the ones that are not in my file are reset by default.

Make sure you have saved as the file for all files.
< >
Showing 1-3 of 3 comments
Per page: 1530 50