Left 4 Dead 2

Left 4 Dead 2

Admin System
cvars file
i just created a cvars file on ems folder and is not working when lauching the game, by example i put this line"scripted_user_func cvar,vs_max_team_switches,99" then i create a new text document and save it as "all files" then i launch the game, start a vs lobby on local and then i cant change teams more than 1 time, so i go to console and input the same code and works, theres is no confilct with any mods also i already change addonconfig all to 0 so its not that admin system is not working, the cvars file isnt
< >
Showing 1-2 of 2 comments
Maur0 Nov 7, 2020 @ 4:19pm 
The cvars commands in the file do not require using the "scripted_user_func cvar," command. You simply add the command "vs_max_team_switches 99" and with that it will change you to that value on your server.

Here's an example of mine:
// HEALTH first_aid_heal_percent 1 adrenaline_duration 30 adrenaline_health_buffer 50 pain_pills_decay_rate 0.21 pain_pills_health_threshold 50 defibrillator_return_to_life_time 0 z_survivor_respawn_health 100 rescue_min_dead_time 0 // SURVIVORS survivor_respawn_with_guns 0 survivor_limp_health 1 survivor_revive_health 50 survivor_revive_duration 2.5 survivor_allow_crawling 1 survivor_crawl_speed 65 survivor_incap_decay_rate 1 survivor_incap_hopeless_decay_rate 300 survivor_incapacitated_dizzy_severity 0 survivor_incapacitated_roll 0 survivor_burn_factor_expert 0.2 survivor_burn_factor_hard 0.2 survivor_friendly_fire_factor_normal 0 survivor_friendly_fire_factor_hard 0 survivor_friendly_fire_factor_expert 0 survivor_autolook_voc_delay 999999 z_friendly_fire_forgiveness 0

Note: after the TLS update, Valve has made the cvars commands reset every time the map is loaded. So if you have these commands:
scripted_user_func max_health,all,100 scripted_user_func health,all,perm scripted_user_func give,all,health scripted_user_func give,all,first_aid_kit scripted_user_func give,all,rifle_m60 scripted_user_func limit,maxspecials,8
They will not work on the first map loaded. You will have to restart by forcing a Game Over with the command !restart or !kill all to make them work again.
Originally posted by Maur0:
The cvars commands in the file do not require using the "scripted_user_func cvar," command. You simply add the command "vs_max_team_switches 99" and with that it will change you to that value on your server.

Here's an example of mine:
// HEALTH first_aid_heal_percent 1 adrenaline_duration 30 adrenaline_health_buffer 50 pain_pills_decay_rate 0.21 pain_pills_health_threshold 50 defibrillator_return_to_life_time 0 z_survivor_respawn_health 100 rescue_min_dead_time 0 // SURVIVORS survivor_respawn_with_guns 0 survivor_limp_health 1 survivor_revive_health 50 survivor_revive_duration 2.5 survivor_allow_crawling 1 survivor_crawl_speed 65 survivor_incap_decay_rate 1 survivor_incap_hopeless_decay_rate 300 survivor_incapacitated_dizzy_severity 0 survivor_incapacitated_roll 0 survivor_burn_factor_expert 0.2 survivor_burn_factor_hard 0.2 survivor_friendly_fire_factor_normal 0 survivor_friendly_fire_factor_hard 0 survivor_friendly_fire_factor_expert 0 survivor_autolook_voc_delay 999999 z_friendly_fire_forgiveness 0

Note: after the TLS update, Valve has made the cvars commands reset every time the map is loaded. So if you have these commands:
scripted_user_func max_health,all,100 scripted_user_func health,all,perm scripted_user_func give,all,health scripted_user_func give,all,first_aid_kit scripted_user_func give,all,rifle_m60 scripted_user_func limit,maxspecials,8
They will not work on the first map loaded. You will have to restart by forcing a Game Over with the command !restart or !kill all to make them work again.
that was the problem , thank you mauro, you are cool
< >
Showing 1-2 of 2 comments
Per page: 1530 50