Raised This Month: $100 Target: $400
 25% 

Config Adder - 0.0.2


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management        Approver:   Arkshine (91)
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-18-2010 , 20:03   Config Adder - 0.0.2
Reply With Quote #1

Config Adder



.: Description :.


This plugin allow, while in-game or from server console, to add some configs commands or cvars in
server.cfg, game.cfg, amxx.cfg, mapname.cfg, prefix_mapprefix.cfg.
Also allow to create folder and to write any file.



.: Commands :.

  • addcfg_server < cfg string >
    Add a config in server.cfg
  • addcfg_game < cfg string >
    Add a config in game.cfg
  • addcfg_amxx < cfg string >
    Add a config in $configsdir/amxx.cfg
  • addcfg_map < cfg string >
    Add a config in $configsdir/maps/currentmapname.cfg
  • addcfg_prefix < cfg string >
    If current mapname has a prefix, add a config in $configsdir/maps/prefix_currentmapprefix.cfg
  • amx_write_file < file path > < string to write >
    Add a line in specified file if folder path can be reached
  • amx_make_dir < folder path >
    Create a directory



.: Examples :.


Code:
addcfg_game mp_timelimit 30
addcfg_prefix mp_timelimit 20
addcfg_map mp_timelimit 8
amx_make_dir misc
amx_write_file misc/dont_forget.txt Buy some bread.
amx_write_file addons/amxmodx/configs/clcmds.ini "Make user quit." "quit" "cd" "u"
amx_write_file addons/amxmodx/configs/cvars.ini "sv_alltalk" "0" "1" "u"


.: ChangeLog :.


Code:
v0.0.2 19 dec 2010
- added command amx_write_file
- added command amx_make_dir

v0.0.1 19 dec 2010
- First release
Attached Files
File Type: sma Get Plugin or Get Source (cfg_adder.sma - 1457 views - 5.0 KB)
__________________
- tired and retired -

Last edited by ConnorMcLeod; 12-19-2010 at 04:00.
ConnorMcLeod is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 12-18-2010 , 20:59   Re: Config Adder
Reply With Quote #2

This is really useful. Gj.

Suggestion: In future versions, you should add support for a custom config or something of the sort.
__________________
Hi.

Last edited by Kreation; 12-18-2010 at 21:16.
Kreation is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-19-2010 , 02:17   Re: Config Adder
Reply With Quote #3

Quote:
Originally Posted by Kreation View Post
Suggestion: In future versions, you should add support for a custom config or something of the sort.
Added amx_make_dir and amx_write_file commands.
__________________
- tired and retired -

Last edited by ConnorMcLeod; 12-19-2010 at 03:52.
ConnorMcLeod is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 12-21-2010 , 02:15   Re: Config Adder - 0.0.2
Reply With Quote #4

Very nice.
__________________
Hi.
Kreation is offline
Kidev
Veteran Member
Join Date: Jun 2010
Location: France
Old 12-21-2010 , 19:23   Re: Config Adder - 0.0.2
Reply With Quote #5

Awesome! Very usefull, I love it!
__________________
Kidev is offline
Luchoo.MC
Member
Join Date: Aug 2010
Location: Almirante Brown
Old 12-22-2010 , 01:31   Re: Config Adder - 0.0.2
Reply With Quote #6

This very necesary and practic. Good Job!
__________________

Club Atlético River Plate
Luchoo.MC is offline
Send a message via MSN to Luchoo.MC
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-28-2010 , 20:09   Re: Config Adder - 0.0.2
Reply With Quote #7

This plugin is well done.

Approved.
__________________
Arkshine is offline
gtpunkt
Veteran Member
Join Date: Dec 2008
Location: Berlin
Old 02-02-2011 , 08:01   Re: Config Adder - 0.0.2
Reply With Quote #8

Indescribable.
Irresistible,this makes all Server owner happy
gtpunkt is offline
Send a message via Skype™ to gtpunkt
JohnNguyen
Junior Member
Join Date: Feb 2011
Old 02-10-2011 , 02:33   Re: Config Adder - 0.0.2
Reply With Quote #9

when i added my config, and restarts the sever it's work, but when i restarts the game it isn't work? what the wrong?
JohnNguyen is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 04-17-2011 , 02:04   Re: Config Adder - 0.0.2
Reply With Quote #10

To improve editing (since you can add duplicated cvars more and more and only the last one will have effect, but that'll be kinda nasty) you should first check if the command already exists in the file and edit it with the new value :}
This could be optional, adding a -r at the end or /r right after the command should do the trick.... or just make different commands, like replacecfg_server

Also, commands would be better like addcvar_* since you're actually adding cvars most of time.

Anyway, great plugin ideea
__________________

Last edited by Hunter-Digital; 04-17-2011 at 02:06.
Hunter-Digital is offline
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 08:50.


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