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

Annotation of /amxmod_compat/amxmod_compat.sma

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download)

1 : ian 1 /**
2 :     * AMX Mod Compatibility engine
3 :     * by the AMX Mod X Development Team
4 :     */
5 :    
6 :     #include <amxmodx>
7 :     #include <fun> //we want fun running for extra compatibility
8 :     #include <engine> //we want engine running for extra compatibility
9 :     #include <fakemeta>
10 :     #include <translator>
11 :     #define AMXMODX_NOAUTOLOAD
12 :     #include <cstrike>
13 :     #include <sqlx>
14 :    
15 :     #define MOD_NORMAL 0
16 :     #define MOD_CSTRIKE 1
17 :    
18 :     new g_ModType = MOD_NORMAL
19 :     new g_MaxPlayers
20 :    
21 :     #include "core.sma"
22 :     #include "vexdum.sma"
23 :     #include "mysql.sma"
24 :    
25 :     public plugin_init()
26 :     {
27 :     register_plugin("AMX Mod Compat Engine", "1.76.rc4", "AMXX Dev Team")
28 :    
29 :     g_MaxPlayers = get_maxplayers()
30 :    
31 :     VexdUM_Register()
32 :     }
33 :    
34 :     public plugin_natives()
35 :     {
36 :     set_module_filter("Plugin_ModuleFilter")
37 :     set_native_filter("Plugin_NativeFilter")
38 :    
39 :     new modname[32]
40 :     get_modname(modname, 31)
41 :     if (equali(modname, "cstrike") || equali(modname, "czero"))
42 :     {
43 :     g_ModType = MOD_CSTRIKE
44 :     }
45 :    
46 :     Core_Natives()
47 :     VexdUM_Natives()
48 :     MySQL_Natives()
49 :     }
50 :    
51 :     public Plugin_ModuleFilter(const module[])
52 :     {
53 :     if (equali(module, "sqlx") || equali(module, "cstrike"))
54 :     {
55 :     return PLUGIN_HANDLED
56 :     }
57 :    
58 :     return PLUGIN_CONTINUE
59 :     }
60 :    
61 :     public Plugin_NativeFilter(const name[], index, trap)
62 :     {
63 :     if (!trap)
64 :     {
65 :     return PLUGIN_HANDLED
66 :     }
67 :    
68 :     return PLUGIN_CONTINUE
69 :     }
70 :    
71 :     public client_connect(id)
72 :     {
73 :     VexdUM_ClientConnect(id)
74 :     }
75 :    

Contact
ViewVC Help
Powered by ViewVC 1.0.4