AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Map Configs (https://forums.alliedmods.net/showthread.php?t=68589)

Liam 03-19-2008 12:38

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

Rebell 03-19-2008 13:34

Re: Map Configs
 
Its similar to manis map config, right ?

Nice... :)

Liam 03-19-2008 14:05

Re: Map Configs
 
Yep, similar, which is why I wrote it. :)

I hate huge server.cfg files. -.-

LocutusH 03-20-2008 06:25

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)

Liam 03-20-2008 07:44

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.

BAILOPAN 05-20-2008 22:18

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.

Liam 05-21-2008 01:42

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.

Liam 06-09-2008 16:05

Re: Map Configs
 
This has been updated to reflect OnAutoConfigsBuffered( );

Requires latest snapshop of the 1.0.2 branch of SM.

Liam 06-20-2008 23:55

Re: Map Configs
 
Updated to version 1.2

dann 06-21-2008 10:05

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 11:51.

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