When Sven Co-op 4 was released, the devs implemented a new feature called static.cfg, in which server owners could define specific cvars without worrying that maps could replace them.
This feature was removed in Sven Co-op 5 so I made this simple plugin to restore the file functionality while also including new features, like a map whitelist or the power to edit weaponmodes (you couldn't edit weaponmodes with static.cfg back in SC4). Add weaponmode_shotgun 1 to the static.cfg file and your server will have the classic shotgun in all the maps! :D
Tested, and made for Sven Co-op 5. Technically it may work in other mods but it's not really needed since those can't override their server.cfg settings.
Whitelisting maps:
This plugin allows you to whitelist maps, the plugin will not apply the static values on maps inside the
static_whitelist.txt file. The reason of this? Sometimes a map will break if you try to override its variables (overriding the sv_gravity value in the map
phobia makes the map unplayable, since you depend on the special gravity setting)
Changelog:
- 1.0
- Added a new cvar amx_static_filename, which allows you to use a different static file, useful if you run various servers that may need different configurations.
- Small optimizations
- 0.9
- 0.5
- Cleaned up and optimized the plugin code
- Fixed a logic error causing a Segmentation Fault in some maps
- Implemented a Whitelist feature
- 0.1B
- Removed a couple of lines causing a redundancy
- 0.1
Instalation:
- Install this plugin like any other
- Download static.cfg file, edit it at your liking and then place it in your amxx/configs folder.
Cvars:
- amx_static_check (default "0") - enforces the plugin to re-apply the static.cfg every n seconds. (to prevent map entities to change certain cvars) 0 to disable this feature.
- amx_static_filename (default "static.cfg") - specifies which static configuration file to use. Useful if you run various servers that may need different configurations.
Credits:
- fysiks - I used his Bot TK Apology plugin as a basis for the file read method and also helped me with the code