AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Config Adder - 0.0.2 (https://forums.alliedmods.net/showthread.php?t=145673)

ConnorMcLeod 12-18-2010 19:03

Config Adder - 0.0.2
 
2 Attachment(s)
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


Kreation 12-18-2010 19:59

Re: Config Adder
 
This is really useful. Gj.

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

ConnorMcLeod 12-19-2010 01:17

Re: Config Adder
 
Quote:

Originally Posted by Kreation (Post 1374177)
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.

Kreation 12-21-2010 01:15

Re: Config Adder - 0.0.2
 
Very nice.

Kidev 12-21-2010 18:23

Re: Config Adder - 0.0.2
 
Awesome! Very usefull, I love it!

Luchoo.MC 12-22-2010 00:31

Re: Config Adder - 0.0.2
 
This very necesary and practic. Good Job!

Arkshine 12-28-2010 19:09

Re: Config Adder - 0.0.2
 
This plugin is well done.

Approved.

gtpunkt 02-02-2011 07:01

Re: Config Adder - 0.0.2
 
Indescribable.
Irresistible,this makes all Server owner happy :wink:

JohnNguyen 02-10-2011 01:33

Re: Config Adder - 0.0.2
 
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?

Hunter-Digital 04-17-2011 01:04

Re: Config Adder - 0.0.2
 
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 :P


All times are GMT -4. The time now is 07:30.

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