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

A .cfg creator


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Searcher64
Senior Member
Join Date: Apr 2010
Old 09-18-2010 , 13:18   A .cfg creator
Reply With Quote #1

Is it possible to auto-create the .cfg file for plugins without actually starting a server?

It's a real pain in the ass to start the game, make a game, let it auto-create the file, then close the game just to get the .cfg
Searcher64 is offline
McFlurry
Veteran Member
Join Date: Mar 2010
Location: RemoveEdict(0);
Old 09-18-2010 , 16:34   Re: A .cfg creator
Reply With Quote #2

Hmm, not really, the server is the fastest way for me.

Edit: If you are actually starting the game and then starting an offline server, use the dedicated server from the game.
__________________

Last edited by McFlurry; 09-18-2010 at 16:36.
McFlurry is offline
Send a message via Skype™ to McFlurry
Searcher64
Senior Member
Join Date: Apr 2010
Old 09-18-2010 , 18:36   Re: A .cfg creator
Reply With Quote #3

hehe yeah, but it would be a lot faster if there was a program that loaded all the plugins instead of starting a server wouldn't it?
Searcher64 is offline
Thrawn2
Veteran Member
Join Date: Apr 2009
Old 09-19-2010 , 03:51   Re: A .cfg creator
Reply With Quote #4

you could write a small script (in perl, phyton, php whatever) which parses your plugin .sp file(s) and outputs the exact same config as the server would. which can get pretty complicated though :[
__________________
einmal mit profis arbeiten. einmal.

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

Here's a dirty Python script to create the config files. Have fun.

EDIT: Updated, I forgot one little thing.
EDIT: Updated, made the syntax more flexible.
EDIT: Support for escaped characters in descriptions.
EDIT: Fixed bug when the plugin doesn't use AutoExecConfig
Attached Files
File Type: zip cfgcreator.zip (851 Bytes, 197 views)

Last edited by Seta00; 09-19-2010 at 21:07.
Seta00 is offline
rhelgeby
Veteran Member
Join Date: Oct 2008
Location: 0x4E6F72776179
Old 09-19-2010 , 18:04   Re: A .cfg creator
Reply With Quote #6

Really nice! Make support for escaped characters (like quotes) in descriptions, and it will be complete.
__________________
Richard Helgeby

Zombie:Reloaded | PawnUnit | Object Library
(Please don't send private messages for support, they will be ignored. Use the forum.)
rhelgeby is offline
Send a message via MSN to rhelgeby
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 09-19-2010 , 19:40   Re: A .cfg creator
Reply With Quote #7

Quote:
Originally Posted by rhelgeby View Post
Really nice! Make support for escaped characters (like quotes) in descriptions, and it will be complete.
Done
Seta00 is offline
rhelgeby
Veteran Member
Join Date: Oct 2008
Location: 0x4E6F72776179
Old 09-19-2010 , 20:06   Re: A .cfg creator
Reply With Quote #8

Now I get "Specified plugin doesn't register any cvar".

Why is "CreateConVar" changed to "register_cvar"?
__________________
Richard Helgeby

Zombie:Reloaded | PawnUnit | Object Library
(Please don't send private messages for support, they will be ignored. Use the forum.)

Last edited by rhelgeby; 09-19-2010 at 20:09.
rhelgeby is offline
Send a message via MSN to rhelgeby
Searcher64
Senior Member
Join Date: Apr 2010
Old 09-19-2010 , 20:16   Re: A .cfg creator
Reply With Quote #9

Quote:
Originally Posted by Seta00 View Post
Here's a dirty Python script to create the config files. Have fun.

EDIT: Updated, I forgot one little thing.
EDIT: Updated, made the syntax more flexible.
EDIT: Support for escaped characters in descriptions.
I'm sorry, but what do I do with the .py file? I tried to open it with Python but...doesn't work. It just pops up a cmd for 1 second then closes
Searcher64 is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 09-19-2010 , 20:21   Re: A .cfg creator
Reply With Quote #10

Quote:
Originally Posted by rhelgeby View Post
Now I get "Specified plugin doesn't register any cvar".

Why is "CreateConVar" changed to "register_cvar"?
lol I've uploaded the AMXx version, it's fixed now.

Quote:
Originally Posted by Searcher64 View Post
I'm sorry, but what do I do with the .py file? I tried to open it with Python but...doesn't work. It just pops up a cmd for 1 second then closes
You have to open a shell, and call
Code:
python cfgcreator.py path/to/source.sp
I think drag-and-drop source.sp to cfgcreator.py might work... it doesn't.

Last edited by Seta00; 09-19-2010 at 20:25.
Seta00 is offline
Reply



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 05:52.


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