Left 4 Dead 2

Left 4 Dead 2

Admin System
High Quality 28. sep. 2020 kl. 20:17
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?
< >
Viser 1-3 af 3 kommentarer
Maur0 29. sep. 2020 kl. 13:12 
This is part of what Valve has done and Rayman1103 (TLS Update Leader) had said about it:
Oprindeligt skrevet af 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:
Oprindeligt skrevet af 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 1. okt. 2020 kl. 1:52 
Oprindeligt skrevet af Maur0:
This is part of what Valve has done and Rayman1103 (TLS Update Leader) had said about it:
Oprindeligt skrevet af 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:
Oprindeligt skrevet af 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 1. okt. 2020 kl. 12:54 
@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.
< >
Viser 1-3 af 3 kommentarer
Per side: 1530 50