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

[REQ] Switching server configs


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Independence
Junior Member
Join Date: Dec 2009
Location: Ukraine
Old 12-27-2009 , 08:28   [REQ] Switching server configs
Reply With Quote #1

Hi. I need such plugin:


Does such plugin exists? If doesnt, please, code it to me or help me to write it
Independence is offline
Old 12-28-2009, 07:37
Independence
This message has been deleted by YamiKaitou. Reason: bump
Independence
Junior Member
Join Date: Dec 2009
Location: Ukraine
Old 01-15-2010 , 09:54   Re: [REQ] Switching server configs
Reply With Quote #2

Up. I really need it. Is it possible? Plz answer!
Independence is offline
worldspawn
Senior Member
Join Date: Aug 2009
Location: Russia, Yekaterinburg
Old 01-15-2010 , 13:36   Re: [REQ] Switching server configs
Reply With Quote #3

http://forums.alliedmods.net/showthread.php?p=856405
may be if you configure this plugin you will get needed result
if you are not able to understand plugin's configuration, post at it's thread, but not here
worldspawn is offline
Send a message via ICQ to worldspawn Send a message via Skype™ to worldspawn
Independence
Junior Member
Join Date: Dec 2009
Location: Ukraine
Old 01-15-2010 , 16:43   Re: [REQ] Switching server configs
Reply With Quote #4

Quote:
Originally Posted by worldspawn View Post
http://forums.alliedmods.net/showthread.php?p=856405
may be if you configure this plugin you will get needed result
if you are not able to understand plugin's configuration, post at it's thread, but not here
I have already tried this plugins, it's cool plugin, but it could not solve my problem - one plugin crashes my server without restart and rewriting it's name in config. I need to remove/move pluginname from plugins.ini (or switch one of 2 presets of plugins.ini) and restart server - it's best solution. Does anyone knows how to make it?
Independence is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-15-2010 , 17:52   Re: [REQ] Switching server configs
Reply With Quote #5

Code:
#include < amxmodx > #include < amxmisc > public plugin_init( ) {     register_plugin( "Set Config", "0.0.1", "Exolent" );         register_concmd( "amx_setconfig", "CmdSetConfig", ADMIN_RCON, "<value>" ); } public CmdSetConfig( iPlayer, iLevel, iCId ) {     if( !cmd_access( iPlayer, iLevel, iCId, 2 ) ) {         return PLUGIN_HANDLED;     }         new szArg[ 16 ];     read_argv( 1, szArg, 15 );         new szConfigsDir[ 64 ];     get_configsdir( szConfigsDir, 63 );         new szNewPlugins[ 128 ];     formatex( szNewPlugins, 127, "%s/setcfg", szConfigsDir );     // addons/amxmodx/configs/setcfg         if( !dir_exists( szNewPlugins ) ) {         console_print( iPlayer, "%s does not exist!", szNewPlugins );         return PLUGIN_HANDLED;     }         add( szNewPlugins, 127, "/" );     // addons/amxmodx/configs/setcfg/     add( szNewPlugins, 127, szArg );     // addons/amxmodx/configs/setcfg/$arg         if( !dir_exists( szNewPlugins ) ) {         console_print( iPlayer, "%s does not exist!", szNewPlugins );         return PLUGIN_HANDLED;     }         add( szNewPlugins, 127, "/plugins.ini" );     // addons/amxmodx/configs/setcfg/$arg/plugins.ini         if( !file_exists( szNewPlugins ) ) {         console_print( iPlayer, "%s does not exist!", szNewPlugins );         return PLUGIN_HANDLED;     }         new szPlugins[ 128 ];     formatex( szPlugins, 127, "%s/plugins.ini", szConfigsDir );         new iPluginsFile = fopen( szPlugins, "wt" );     new iNewPluginsFile = fopen( szNewPlugins, "rt" );         new szData[ 512 ];     while( !feof( iNewPluginsFile ) ) {         fgets( iNewPluginsFile, szData, 511 );         fputs( iPluginsFile, szData );     }         fclose( iNewPluginsFile );     fclose( iPluginsFile );         server_cmd( "restart" );         return PLUGIN_HANDLED; }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 01-18-2010 at 15:45.
Exolent[jNr] is offline
Independence
Junior Member
Join Date: Dec 2009
Location: Ukraine
Old 01-16-2010 , 08:39   Re: [REQ] Switching server configs
Reply With Quote #6

2Exolent

Code:
amxsetconfig.sma(35) : error 035: argument type mismatch (argument 2)

1 Error.
Could not locate output file amxsetconfig.amx (compile failed).
Independence is offline
Old 01-16-2010, 08:47
Independence
This message has been deleted by Independence. Reason: dub
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-16-2010 , 12:23   Re: [REQ] Switching server configs
Reply With Quote #7

Fixed.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 01-16-2010 , 13:20   Re: [REQ] Switching server configs
Reply With Quote #8

Quote:
Originally Posted by Independence View Post
Up. I really need it. Is it possible? Plz answer!
It is possible to do something that modifies any of this server info settings

Code:
amxx_configsdir	addons/amxmodx/configs
amxx_plugins	addons/amxmodx/configs/plugins.ini
amxx_pluginsdir	addons/amxmodx/plugins
amx_configdir	addons/amxmodx/configs
amx_pluginsdir	addons/amxmodx/plugins
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Independence
Junior Member
Join Date: Dec 2009
Location: Ukraine
Old 01-17-2010 , 06:08   Re: [REQ] Switching server configs
Reply With Quote #9

Quote:
Originally Posted by Exolent[jNr] View Post
Fixed.
Thanks for help and attention!

Sorry, but are you sure that it works? I have tried this one - it doesnt work ((
Independence is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-18-2010 , 15:46   Re: [REQ] Switching server configs
Reply With Quote #10

Does the server restart when the command is issued?
If not, use the code above (I edited it) and it will tell you if something in the command went wrong.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 21:04.


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