Raised This Month: $32 Target: $400
 8% 

.cfg creator


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 09-19-2010 , 18:50   .cfg creator
Reply With Quote #1

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.
Attached Files
File Type: zip cfgcreator.zip (736 Bytes, 140 views)

Last edited by Seta00; 09-19-2010 at 19:45.
Seta00 is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 09-19-2010 , 19:45   Re: .cfg creator
Reply With Quote #2

Added support for escaped characters.
Seta00 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-19-2010 , 19:48   Re: .cfg creator
Reply With Quote #3

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).
__________________
fysiks is offline
8088
Veteran Member
Join Date: Jan 2008
Old 09-19-2010 , 19:49   Re: .cfg creator
Reply With Quote #4

Nice! I'm afraid I won't use it, though.
__________________
steamID converter with OpenSearch browser plugin
8088 is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 09-19-2010 , 19:55   Re: .cfg creator
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
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.
Seta00 is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 09-19-2010 , 23:20   Re: .cfg creator
Reply With Quote #6

Impressive. I may use this.
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
Reply


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 21:35.


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