Map Configs
1 Attachment(s)
Map Configs Plugin
------------------ This plugin handles the loading and unloading of map config files. This is beneficial and more helpful than the stock config file loader as you do not have to worry about making sure all of your values are reset back to default for the next map. The config files should be placed in %sourcemod%/configs/maps, and the formatting for these are straight forward: one cvar per line, and they can be any format needed. If you have any questions, feel free to reply to this thread or find me in #sourcemod on irc.gamesurge.net. This plugin requires the latest 1.0.2 snapshot of SourceMod. Changelog -1.0 - Original Release -1.1 - Updated to use OnAutoConfigsBuffered( ) -1.2 - Updated to correct issues with OnAutoConfigsBuffered( ) Enjoy! -Liam |
Re: Map Configs
Its similar to manis map config, right ?
Nice... :) |
Re: Map Configs
Yep, similar, which is why I wrote it. :)
I hate huge server.cfg files. -.- |
Re: Map Configs
This: http://forums.alliedmods.net/showthread.php?t=57779
Does the same, and its working perfect. (dunno why it is unapproved, the unapproval reason is bullshit) |
Re: Map Configs
Actually, no. It doesn't do the same thing.
That plugin (http://forums.alliedmods.net/showthread.php?t=57779) does nothing but 'exec <mapcfg>'. My plugin tracks what cvars were loaded and then makes sure they are reset to default values on map end. While this isn't overly more complex, it is a difference. |
Re: Map Configs
Your plugin has a race condition. OnConfigsExecuted() guarantees that all configs have finished executing. But you're issuing an "exec" command inside OnConfigsExecuted(), and the changes won't necessarily be mirrored in plugins which rely on this guarantee (such as reservedslots).
I've added a forward to the 1.1 branch to help mitigate this problem, you can read about it here. This change will make it into 1.0.2 or so. I won't unapprove this plugin until a stable release has the new feature and this plugin has had time to update after that. Note: "fixing" by using OnMapStart() is not a good idea since it occurs before sourcemod.cfg gets executed. |
Re: Map Configs
So I need to change that to update using OnAutoConfigsBuffered() ?
Will be happy to update that as soon as 1.0.2 is updated for it. :) Thanks for the info Bailopan. |
Re: Map Configs
This has been updated to reflect OnAutoConfigsBuffered( );
Requires latest snapshop of the 1.0.2 branch of SM. |
Re: Map Configs
Updated to version 1.2
|
Re: Map Configs
i just updated to sourcemod 1.0.3.2265 and tried your plugin. it seems to work on changing server varibles(mp_timelimit etc), but doesn't seem to be changing the sourcemod varibles any longer. I turn off my afk manager and reserved slots on certain maps, but the stay active now. it seems like map configs are being executed before the sourcemod configs or something(im just guessing).
thanks and hopefully you can get this updated soon. |
All times are GMT -4. The time now is 14:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.