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

Annotation of /autocfg.sma

Parent Directory Parent Directory | Revision Log Revision Log


Revision 25 - (view) (download)

1 : ian 1 /*
2 : ian 25 AutoCFG v0.1
3 :     Copyright (C) 2006-2007 Ian (Juan) Cammarata
4 :    
5 :     This program is free software: you can redistribute it and/or modify
6 :     it under the terms of the GNU Affero General Public License as
7 :     published by the Free Software Foundation, either version 3 of the
8 :     License, or (at your option) any later version.
9 :    
10 :     This program is distributed in the hope that it will be useful,
11 :     but WITHOUT ANY WARRANTY; without even the implied warranty of
12 :     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 :     GNU Affero General Public License for more details.
14 :    
15 :     You should have received a copy of the GNU Affero General Public License
16 :     along with this program. If not, see <http://www.gnu.org/licenses/>.
17 :     --------------------------------------------------------------------------------
18 :    
19 :     http://ian.cammarata.us
20 :     8/27/2005 4:33:13 PM
21 :     --------------------------------------------------------------------------------
22 :     Change Log:
23 :     Key (+ added | - removed | c changed | f fixed | r refactored)
24 :     v0.1.1
25 :     f: Displays correct cfg file name to players.
26 :     r: Cvar no longer uses .cfg on end of config name.
27 : ian 1 */
28 :    
29 :     #include <amxmod>
30 :     #include <cstrike2>
31 :     public client_putinserver(id){
32 :     if(!is_user_bot(id)){
33 :     new ida[1]
34 :     ida[0]=id
35 :     set_task(2.0,"execcfg",0,ida,1)
36 :     }
37 :     return PLUGIN_CONTINUE
38 :     }
39 :     public execcfg(ida[1]){
40 :     new cfg[16]
41 :     get_cvar_string("mp_autocfg",cfg,15)
42 :     if(strlen(cfg)){
43 :     client_cmd(ida[0],"exec %s.cfg",cfg)
44 :     new msg[50]
45 :     format(msg,49,"^x04Now loading your %s.cfg if present.",cfg)
46 :     saytext(ida[0],ida[0],msg)
47 :     }
48 :     }
49 :     public plugin_init(){
50 :     register_plugin("AutoCFG","0.1.1","Don Juan-jello")
51 :     register_cvar("mp_autocfg","")
52 : ian 25 }

Contact
ViewVC Help
Powered by ViewVC 1.0.4