AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Off-Topic (https://forums.alliedmods.net/forumdisplay.php?f=15)
-   -   .cfg creator (https://forums.alliedmods.net/showthread.php?t=138574)

Seta00 09-19-2010 18:50

.cfg creator
 
2 Attachment(s)
Conversion of this to AMXX.
Since GoldSrc doesn't provide a way to set cvar descriptions, the script will use comments appended to the cvar register call as the cvar description, unless you pass -no-desc after the sourcefile.

Example:
Code:

python cfgcreator.py source.sma
will create a file source.cfg.

Code:

python cfgcreator.py source.sma -no-desc
will create a file source.cfg, but will ignore cvar comments.

Seta00 09-19-2010 19:45

Re: .cfg creator
 
Added support for escaped characters.

fysiks 09-19-2010 19:48

Re: .cfg creator
 
This just makes a file of cvars from a single plugin? Seems like you would only need this once (right after you finish writing the plugin and only if it's a big plugin with lots of cvars).

8088 09-19-2010 19:49

Re: .cfg creator
 
Nice! I'm afraid I won't use it, though.

Seta00 09-19-2010 19:55

Re: .cfg creator
 
Quote:

Originally Posted by fysiks (Post 1303802)
This just makes a file of cvars from a single plugin? Seems like you would only need this once (right after you finish writing the plugin and only if it's a big plugin with lots of cvars).

This is basically a replacement for SourceMod's AutoExecConfig native, which automatically creates and calls the .cfg file with all the cvars for the plugin.
With this script you don't need to start a server to do so.
Unfortunately AMXx doesn't have a similar system, but you can call the script to quickly generate a .cfg file to provide with your plugin. The user will have to manually add the 'exec file.cfg' line to his server.cfg, though.

DruGzOG 09-19-2010 23:20

Re: .cfg creator
 
Impressive. I may use this.


All times are GMT -4. The time now is 23:27.

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