Raised This Month: $12 Target: $400
 3% 

[Sven Co-op] Static.cfg restoration


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Plugin Info:     Modification:   Sven Coop        Category:   Server Management       
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 02-15-2016 , 05:13   [Sven Co-op] Static.cfg restoration
Reply With Quote #1

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
    • Tons of optimizations
  • 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
    • Initial release

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
Attached Files
File Type: txt static_whitelist.txt (143 Bytes, 445 views)
File Type: cfg static.cfg (376 Bytes, 327 views)
File Type: sma Get Plugin or Get Source (static_cfg_restoration.sma - 1220 views - 5.1 KB)
__________________

Last edited by gabuch2; 07-13-2016 at 15:59.
gabuch2 is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode