[Half-Life AMXX] / autocfg.sma Repository:
ViewVC logotype

View of /autocfg.sma

Parent Directory Parent Directory | Revision Log Revision Log


Revision 25 - (download) (annotate)
Tue Nov 20 22:36:56 2007 UTC (12 years, 11 months ago) by ian
File size: 1676 byte(s)
Applied AGPLv3 license.
/*
AutoCFG v0.1
Copyright (C) 2006-2007 Ian (Juan) Cammarata

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------------

http://ian.cammarata.us
8/27/2005 4:33:13 PM
--------------------------------------------------------------------------------
Change Log:
	Key (+ added | - removed | c changed | f fixed | r refactored)
	v0.1.1
		f: Displays correct cfg file name to players.
		r: Cvar no longer uses .cfg on end of config name.
*/

#include <amxmod>
#include <cstrike2>
public client_putinserver(id){
	if(!is_user_bot(id)){
		new ida[1]
		ida[0]=id
		set_task(2.0,"execcfg",0,ida,1)
	}
	return PLUGIN_CONTINUE
}
public execcfg(ida[1]){
	new cfg[16]
	get_cvar_string("mp_autocfg",cfg,15)
	if(strlen(cfg)){
		client_cmd(ida[0],"exec %s.cfg",cfg)
		new msg[50]
		format(msg,49,"^x04Now loading your %s.cfg if present.",cfg)
		saytext(ida[0],ida[0],msg)
	}
}
public plugin_init(){
	register_plugin("AutoCFG","0.1.1","Don Juan-jello")
	register_cvar("mp_autocfg","")
}

Contact
ViewVC Help
Powered by ViewVC 1.0.4