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

Annotation of /autocfg.sma

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download)

1 : ian 1 /*
2 :     * AutoCFG v0.1
3 :     * Created by Don Juan-jello
4 :     * http://www.jello-net.com
5 :     * For AMX 0.9.9
6 :     * 8/27/2005 4:33:13 PM
7 :     *==============================================================================
8 :     * Change Log:
9 :     * Key (+ added | - removed | c changed | f fixed | r refactored)
10 :     * v0.1.1
11 :     * f: Displays correct cfg file name to players.
12 :     * r: Cvar no longer uses .cfg on end of config name.
13 :     */
14 :    
15 :     #include <amxmod>
16 :     #include <cstrike2>
17 :     public client_putinserver(id){
18 :     if(!is_user_bot(id)){
19 :     new ida[1]
20 :     ida[0]=id
21 :     set_task(2.0,"execcfg",0,ida,1)
22 :     }
23 :     return PLUGIN_CONTINUE
24 :     }
25 :     public execcfg(ida[1]){
26 :     new cfg[16]
27 :     get_cvar_string("mp_autocfg",cfg,15)
28 :     if(strlen(cfg)){
29 :     client_cmd(ida[0],"exec %s.cfg",cfg)
30 :     new msg[50]
31 :     format(msg,49,"^x04Now loading your %s.cfg if present.",cfg)
32 :     saytext(ida[0],ida[0],msg)
33 :     }
34 :     }
35 :     public plugin_init(){
36 :     register_plugin("AutoCFG","0.1.1","Don Juan-jello")
37 :     register_cvar("mp_autocfg","")
38 :     }

Contact
ViewVC Help
Powered by ViewVC 1.0.4