
/* AMX Mod script.
*
* (c) Copyright 2002, Noplay
* This file is provided as is (no warranties).
*
* Thanks to dJeyL
*/

/*WARNING YOU NEED LAUNCH YOU SERVER WITH ARGS +port AND NOT -port*/

/*
With this plugin you load a cfg different by server port

for example if you server are on the port 27016, the plugin load:
addons/amx/27016.cfg

But your (listen)server.cfg are launch before
*/


#include <amxmod>



public plugin_init()
{
	new port[6]
	new files[22]
	
	register_plugin("Port CFG","0.2","Noplay")

	get_cvar_string("port",port,5)

	format(files,21,"addons/amx/%s.cfg",port) 

	if(file_exists(files)==1)
	{
		server_cmd("exec %s",files)
	}

	return PLUGIN_CONTINUE
}

