amxx sdk update

This commit is contained in:
Lukasz Wlasinksi 2004-07-21 14:18:01 +00:00
parent 0b9f3d8e8c
commit 594edabac0
17 changed files with 130 additions and 58 deletions

View File

@ -1,4 +1,36 @@
/* AMX Mod X
*
* by the AMX Mod X Development Team
* originally developed by OLO
*
* Parts Copyright (C) 2001-2003 Will Day <willday@hpgx.net>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 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
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, the author gives permission to
* link the code of this program with the Half-Life Game Engine ("HL
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
* L.L.C ("Valve"). You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve. If you modify this file, you may extend this exception
* to your version of the file, but you are not obligated to do so. If
* you do not wish to do so, delete this exception statement from your
* version.
*
* Description: AMX Mod X Module Interface Functions
*/
#include <string.h> #include <string.h>
#include <new> #include <new>
@ -2442,6 +2474,9 @@ PFN_LOAD_AMXSCRIPT g_fn_LoadAmxScript;
PFN_UNLOAD_AMXSCRIPT g_fn_UnloadAmxScript; PFN_UNLOAD_AMXSCRIPT g_fn_UnloadAmxScript;
PFN_REAL_TO_CELL g_fn_RealToCell; PFN_REAL_TO_CELL g_fn_RealToCell;
PFN_CELL_TO_REAL g_fn_CellToReal; PFN_CELL_TO_REAL g_fn_CellToReal;
PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward;
PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName;
PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward;
// *** Exports *** // *** Exports ***
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo) C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
@ -2510,6 +2545,9 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES); REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES);
REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR); REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR);
REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD); REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD);
REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD);
REQFUNC("RegisterSPForwardByName", g_fn_RegisterSPForwardByName, PFN_REGISTER_SPFORWARD_BYNAME);
REQFUNC("UnregisterSPForward", g_fn_UnregisterSPForward, PFN_UNREGISTER_SPFORWARD);
REQFUNC("ExecuteForward", g_fn_ExecuteForward, PFN_EXECUTE_FORWARD); REQFUNC("ExecuteForward", g_fn_ExecuteForward, PFN_EXECUTE_FORWARD);
REQFUNC("PrepareCellArray", g_fn_PrepareCellArray, PFN_PREPARE_CELLARRAY); REQFUNC("PrepareCellArray", g_fn_PrepareCellArray, PFN_PREPARE_CELLARRAY);
REQFUNC("PrepareCharArray", g_fn_PrepareCharArray, PFN_PREPARE_CHARARRAY); REQFUNC("PrepareCharArray", g_fn_PrepareCharArray, PFN_PREPARE_CHARARRAY);
@ -2584,7 +2622,7 @@ void MF_Log(const char *fmt, ...)
#ifdef _DEBUG #ifdef _DEBUG
// validate macros // validate macros
// Makes sure compiler reports errors when macros are invalid // Makes sure compiler reports errors when macros are invalid
void ValidateMacros() void ValidateMacros_DontCallThis_Smiley()
{ {
MF_BuildPathname("str", "str", 0); MF_BuildPathname("str", "str", 0);
MF_FormatAmxString(NULL, 0, 0, NULL); MF_FormatAmxString(NULL, 0, 0, NULL);
@ -2630,6 +2668,9 @@ void ValidateMacros()
MF_AmxAllot(0, 0, 0, 0); MF_AmxAllot(0, 0, 0, 0);
MF_LoadAmxScript(0, 0, 0, 0); MF_LoadAmxScript(0, 0, 0, 0);
MF_UnloadAmxScript(0, 0); MF_UnloadAmxScript(0, 0);
MF_RegisterSPForward(0, 0, 0, 0, 0, 0);
MF_RegisterSPForwardByName(0, 0, 0, 0, 0, 0);
MF_UnregisterSPForward(0);
} }
#endif #endif

View File

@ -257,9 +257,9 @@ void FN_META_QUERY(void);
void FN_META_ATTACH(void); void FN_META_ATTACH(void);
#endif // FN_META_ATTACH #endif // FN_META_ATTACH
#ifdef FN_META_DETTACH #ifdef FN_META_DETACH
void FN_META_DETTACH(void); void FN_META_DETACH(void);
#endif // FN_META_DETTACH #endif // FN_META_DETACH
@ -1869,9 +1869,9 @@ void FN_AMXX_QUERY(void);
void FN_AMXX_ATTACH(void); void FN_AMXX_ATTACH(void);
#endif // FN_AMXX_ATTACH #endif // FN_AMXX_ATTACH
#ifdef FN_AMXX_DETTACH #ifdef FN_AMXX_DETACH
void FN_AMXX_DETTACH(void); void FN_AMXX_DETACH(void);
#endif // FN_AMXX_DETTACH #endif // FN_AMXX_DETACH
#ifdef FN_AMXX_PLUGINSLOADED #ifdef FN_AMXX_PLUGINSLOADED
void FN_AMXX_PLUGINSLOADED(void); void FN_AMXX_PLUGINSLOADED(void);
@ -1951,6 +1951,9 @@ typedef int (*PFN_LOAD_AMXSCRIPT) (AMX* /*amx*/, void** /*code*/, const cha
typedef int (*PFN_UNLOAD_AMXSCRIPT) (AMX* /*amx*/,void** /*code*/); typedef int (*PFN_UNLOAD_AMXSCRIPT) (AMX* /*amx*/,void** /*code*/);
typedef cell (*PFN_REAL_TO_CELL) (REAL /*x*/); typedef cell (*PFN_REAL_TO_CELL) (REAL /*x*/);
typedef REAL (*PFN_CELL_TO_REAL) (cell /*x*/); typedef REAL (*PFN_CELL_TO_REAL) (cell /*x*/);
typedef int (*PFN_REGISTER_SPFORWARD) (AMX * /*amx*/, int /*func*/, ... /*params*/);
typedef int (*PFN_REGISTER_SPFORWARD_BYNAME) (AMX * /*amx*/, const char * /*funcName*/, ... /*params*/);
typedef void (*PFN_UNREGISTER_SPFORWARD) (int /*id*/);
extern PFN_ADD_NATIVES g_fn_AddNatives; extern PFN_ADD_NATIVES g_fn_AddNatives;
extern PFN_BUILD_PATHNAME g_fn_BuildPathname; extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
@ -1999,6 +2002,9 @@ extern PFN_LOAD_AMXSCRIPT g_fn_LoadAmxScript;
extern PFN_UNLOAD_AMXSCRIPT g_fn_UnloadAmxScript; extern PFN_UNLOAD_AMXSCRIPT g_fn_UnloadAmxScript;
extern PFN_REAL_TO_CELL g_fn_RealToCell; extern PFN_REAL_TO_CELL g_fn_RealToCell;
extern PFN_CELL_TO_REAL g_fn_CellToReal; extern PFN_CELL_TO_REAL g_fn_CellToReal;
extern PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward;
extern PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName;
extern PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward;
#ifdef MAY_NEVER_BE_DEFINED #ifdef MAY_NEVER_BE_DEFINED
// Function prototypes for intellisense and similar systems // Function prototypes for intellisense and similar systems
@ -2044,6 +2050,9 @@ int MF_GetPlayerArmor (int id) { }
int MF_GetPlayerHealth (int id) { } int MF_GetPlayerHealth (int id) { }
REAL amx_ctof (cell x) { } REAL amx_ctof (cell x) { }
cell amx_ftoc (float x) { } cell amx_ftoc (float x) { }
int MF_RegisterSPForwardByName (AMX * amx, const char *str, ...) { }
int MF_RegisterSPForward (AMX * amx, int func, ...) { }
void MF_UnregisterSPForward (int id) { }
#endif // MAY_NEVER_BE_DEFINED #endif // MAY_NEVER_BE_DEFINED
#define MF_AddNatives g_fn_AddNatives #define MF_AddNatives g_fn_AddNatives
@ -2093,6 +2102,9 @@ void MF_Log(const char *fmt, ...);
#define MF_UnloadAmxScript g_fn_UnloadAmxScript #define MF_UnloadAmxScript g_fn_UnloadAmxScript
#define amx_ctof g_fn_CellToReal #define amx_ctof g_fn_CellToReal
#define amx_ftoc g_fn_RealToCell #define amx_ftoc g_fn_RealToCell
#define MF_RegisterSPForwardByName g_fn_RegisterSPForwardByName
#define MF_RegisterSPForward g_fn_RegisterSPForward
#define MF_UnregisterSPForward g_fn_UnregisterSPForward
/*** Memory ***/ /*** Memory ***/
void *operator new(size_t reportedSize); void *operator new(size_t reportedSize);

View File

@ -289,7 +289,7 @@ void TraceLine_Post(const float *v1, const float *v2, int fNoMonsters, edict_t *
RETURN_META(MRES_IGNORED); RETURN_META(MRES_IGNORED);
} }
void FN_META_ATTACH() { void OnMetaAttach() {
CVAR_REGISTER (&init_csstats_maxsize); CVAR_REGISTER (&init_csstats_maxsize);
CVAR_REGISTER (&init_csstats_reset); CVAR_REGISTER (&init_csstats_reset);
@ -304,7 +304,7 @@ void FN_META_ATTACH() {
csstats_pause = CVAR_GET_POINTER(init_csstats_pause.name); csstats_pause = CVAR_GET_POINTER(init_csstats_pause.name);
} }
void FN_AMXX_ATTACH(){ void OnAmxxAttach(){
MF_AddNatives(stats_Natives); MF_AddNatives(stats_Natives);
const char* path = get_localinfo("csstats_score"); const char* path = get_localinfo("csstats_score");
if ( path && *path ) if ( path && *path )
@ -320,13 +320,13 @@ void FN_AMXX_ATTACH(){
} }
} }
void FN_AMXX_Detach() { void OnAmxxDetach() {
g_grenades.clear(); g_grenades.clear();
g_rank.clear(); g_rank.clear();
g_rank.unloadCalc(); g_rank.unloadCalc();
} }
void FN_AMXX_PLUGINSLOADED(){ void OnPluginsLoaded(){
iFDamage = MF_RegisterForward("client_damage",ET_IGNORE,FP_CELL,FP_CELL,FP_CELL,FP_CELL,FP_CELL,FP_CELL,FP_DONE); iFDamage = MF_RegisterForward("client_damage",ET_IGNORE,FP_CELL,FP_CELL,FP_CELL,FP_CELL,FP_CELL,FP_CELL,FP_DONE);
iFDeath = MF_RegisterForward("client_death",ET_IGNORE,FP_CELL,FP_CELL,FP_CELL,FP_CELL,FP_CELL,FP_DONE); iFDeath = MF_RegisterForward("client_death",ET_IGNORE,FP_CELL,FP_CELL,FP_CELL,FP_CELL,FP_CELL,FP_DONE);
iFGrenade = MF_RegisterForward("grenade_throw",ET_IGNORE,FP_CELL,FP_CELL,FP_CELL,FP_DONE); iFGrenade = MF_RegisterForward("grenade_throw",ET_IGNORE,FP_CELL,FP_CELL,FP_CELL,FP_DONE);

View File

@ -29,7 +29,7 @@
// Do native functions init here (MF_AddNatives) // Do native functions init here (MF_AddNatives)
#define FN_AMXX_ATTACH OnAmxxAttach #define FN_AMXX_ATTACH OnAmxxAttach
// AMXX dettach // AMXX dettach
#define FN_AMXX_DETTACH OnAmxxDettach #define FN_AMXX_DETACH OnAmxxDetach
// All plugins loaded // All plugins loaded
// Do forward functions init here (MF_RegisterForward) // Do forward functions init here (MF_RegisterForward)
#define FN_AMXX_PLUGINSLOADED OnPluginsLoaded #define FN_AMXX_PLUGINSLOADED OnPluginsLoaded
@ -49,7 +49,7 @@
// Meta attach // Meta attach
#define FN_META_ATTACH OnMetaAttach #define FN_META_ATTACH OnMetaAttach
// Meta dettach // Meta dettach
#define FN_META_DETTACH OnMetaDettach //#define FN_META_DETACH OnMetaDetach
// (wd) are Will Day's notes // (wd) are Will Day's notes
// - GetEntityAPI2 functions // - GetEntityAPI2 functions

View File

@ -97,11 +97,30 @@ static cell AMX_NATIVE_CALL nade_set_fuse(AMX *amx, cell *params){ // id,(re)set
return 0; return 0;
} }
static cell AMX_NATIVE_CALL dod_get_wpninfo(AMX *amx, cell *params){ // id
int index = params[1];
if (index<1||index>gpGlobals->maxClients){
MF_RaiseAmxError(amx,AMX_ERR_NATIVE);
return 0;
}
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
//weapon_data_t wdata;
//mm_DispatchThink(pPlayer->pEdict);
//mm_GetWeaponData(pPlayer->pEdict,&wdata);
//MF_PrintSrvConsole("%d \n",wdata.iuser1);
return 1;
}
AMX_NATIVE_INFO base_Natives[] = { AMX_NATIVE_INFO base_Natives[] = {
{ "dod_set_stamina", set_player_stamina }, { "dod_set_stamina", set_player_stamina },
{ "dod_set_fuse", nade_set_fuse }, { "dod_set_fuse", nade_set_fuse },
{ "dod_get_wpninfo", dod_get_wpninfo },
///******************* ///*******************
{ NULL, NULL } { NULL, NULL }
}; };

View File

@ -257,9 +257,9 @@ void FN_META_QUERY(void);
void FN_META_ATTACH(void); void FN_META_ATTACH(void);
#endif // FN_META_ATTACH #endif // FN_META_ATTACH
#ifdef FN_META_DETTACH #ifdef FN_META_DETACH
void FN_META_DETTACH(void); void FN_META_DETACH(void);
#endif // FN_META_DETTACH #endif // FN_META_DETACH
@ -1869,9 +1869,9 @@ void FN_AMXX_QUERY(void);
void FN_AMXX_ATTACH(void); void FN_AMXX_ATTACH(void);
#endif // FN_AMXX_ATTACH #endif // FN_AMXX_ATTACH
#ifdef FN_AMXX_DETTACH #ifdef FN_AMXX_DETACH
void FN_AMXX_DETTACH(void); void FN_AMXX_DETACH(void);
#endif // FN_AMXX_DETTACH #endif // FN_AMXX_DETACH
#ifdef FN_AMXX_PLUGINSLOADED #ifdef FN_AMXX_PLUGINSLOADED
void FN_AMXX_PLUGINSLOADED(void); void FN_AMXX_PLUGINSLOADED(void);

View File

@ -239,16 +239,16 @@ void SetModel_Post(edict_t *e, const char *m){
RETURN_META(MRES_IGNORED); RETURN_META(MRES_IGNORED);
} }
void FN_META_ATTACH() { void OnMetaAttach() {
CVAR_REGISTER (&init_dodfun_steam); CVAR_REGISTER (&init_dodfun_steam);
dodfun_steam = CVAR_GET_POINTER(init_dodfun_steam.name); dodfun_steam = CVAR_GET_POINTER(init_dodfun_steam.name);
} }
void FN_AMXX_ATTACH() { void OnAmxxAttach() {
MF_AddNatives( base_Natives ); MF_AddNatives( base_Natives );
MF_AddNatives( pd_Natives ); MF_AddNatives( pd_Natives );
} }
void FN_AMXX_PLUGINSLOADED(){ void OnPluginsLoaded(){
iFGrenade = MF_RegisterForward("grenade_throw",ET_IGNORE,FP_CELL,FP_CELL,FP_CELL,FP_DONE); iFGrenade = MF_RegisterForward("grenade_throw",ET_IGNORE,FP_CELL,FP_CELL,FP_CELL,FP_DONE);
} }

View File

@ -29,7 +29,7 @@
// Do native functions init here (MF_AddNatives) // Do native functions init here (MF_AddNatives)
#define FN_AMXX_ATTACH OnAmxxAttach #define FN_AMXX_ATTACH OnAmxxAttach
// AMXX dettach // AMXX dettach
#define FN_AMXX_DETTACH OnAmxxDettach //#define FN_AMXX_DETACH OnAmxxDetach
// All plugins loaded // All plugins loaded
// Do forward functions init here (MF_RegisterForward) // Do forward functions init here (MF_RegisterForward)
#define FN_AMXX_PLUGINSLOADED OnPluginsLoaded #define FN_AMXX_PLUGINSLOADED OnPluginsLoaded
@ -49,7 +49,7 @@
// Meta attach // Meta attach
#define FN_META_ATTACH OnMetaAttach #define FN_META_ATTACH OnMetaAttach
// Meta dettach // Meta dettach
// #define FN_META_DETTACH OnMetaDettach // #define FN_META_DETACH OnMetaDetach
// (wd) are Will Day's notes // (wd) are Will Day's notes
// - GetEntityAPI2 functions // - GetEntityAPI2 functions

View File

@ -257,9 +257,9 @@ void FN_META_QUERY(void);
void FN_META_ATTACH(void); void FN_META_ATTACH(void);
#endif // FN_META_ATTACH #endif // FN_META_ATTACH
#ifdef FN_META_DETTACH #ifdef FN_META_DETACH
void FN_META_DETTACH(void); void FN_META_DETACH(void);
#endif // FN_META_DETTACH #endif // FN_META_DETACH
@ -1869,9 +1869,9 @@ void FN_AMXX_QUERY(void);
void FN_AMXX_ATTACH(void); void FN_AMXX_ATTACH(void);
#endif // FN_AMXX_ATTACH #endif // FN_AMXX_ATTACH
#ifdef FN_AMXX_DETTACH #ifdef FN_AMXX_DETACH
void FN_AMXX_DETTACH(void); void FN_AMXX_DETACH(void);
#endif // FN_AMXX_DETTACH #endif // FN_AMXX_DETACH
#ifdef FN_AMXX_PLUGINSLOADED #ifdef FN_AMXX_PLUGINSLOADED
void FN_AMXX_PLUGINSLOADED(void); void FN_AMXX_PLUGINSLOADED(void);

View File

@ -334,7 +334,7 @@ void DispatchKeyValue_Post( edict_t *pentKeyvalue, KeyValueData *pkvd ){
RETURN_META(MRES_IGNORED); RETURN_META(MRES_IGNORED);
} }
void FN_META_ATTACH() { void OnMetaAttach() {
CVAR_REGISTER (&init_dodstats_maxsize); CVAR_REGISTER (&init_dodstats_maxsize);
CVAR_REGISTER (&init_dodstats_reset); CVAR_REGISTER (&init_dodstats_reset);
@ -352,7 +352,7 @@ void FN_META_ATTACH() {
} }
void FN_AMXX_ATTACH() { void OnAmxxAttach() {
MF_AddNatives( stats_Natives ); MF_AddNatives( stats_Natives );
MF_AddNatives( base_Natives ); MF_AddNatives( base_Natives );
@ -372,7 +372,7 @@ void FN_AMXX_ATTACH() {
} }
void FN_AMXX_Detach() { void OnAmxxDetach() {
g_rank.clear(); g_rank.clear();
g_grenades.clear(); g_grenades.clear();
g_rank.unloadCalc(); g_rank.unloadCalc();

View File

@ -29,7 +29,7 @@
// Do native functions init here (MF_AddNatives) // Do native functions init here (MF_AddNatives)
#define FN_AMXX_ATTACH OnAmxxAttach #define FN_AMXX_ATTACH OnAmxxAttach
// AMXX dettach // AMXX dettach
#define FN_AMXX_DETTACH OnAmxxDettach #define FN_AMXX_DETACH OnAmxxDetach
// All plugins loaded // All plugins loaded
// Do forward functions init here (MF_RegisterForward) // Do forward functions init here (MF_RegisterForward)
//#define FN_AMXX_PLUGINSLOADED OnPluginsLoaded //#define FN_AMXX_PLUGINSLOADED OnPluginsLoaded
@ -49,7 +49,7 @@
// Meta attach // Meta attach
#define FN_META_ATTACH OnMetaAttach #define FN_META_ATTACH OnMetaAttach
// Meta dettach // Meta dettach
// #define FN_META_DETTACH OnMetaDettach //#define FN_META_DETACH OnMetaDetach
// (wd) are Will Day's notes // (wd) are Will Day's notes
// - GetEntityAPI2 functions // - GetEntityAPI2 functions

View File

@ -257,9 +257,9 @@ void FN_META_QUERY(void);
void FN_META_ATTACH(void); void FN_META_ATTACH(void);
#endif // FN_META_ATTACH #endif // FN_META_ATTACH
#ifdef FN_META_DETTACH #ifdef FN_META_DETACH
void FN_META_DETTACH(void); void FN_META_DETACH(void);
#endif // FN_META_DETTACH #endif // FN_META_DETACH
@ -1869,9 +1869,9 @@ void FN_AMXX_QUERY(void);
void FN_AMXX_ATTACH(void); void FN_AMXX_ATTACH(void);
#endif // FN_AMXX_ATTACH #endif // FN_AMXX_ATTACH
#ifdef FN_AMXX_DETTACH #ifdef FN_AMXX_DETACH
void FN_AMXX_DETTACH(void); void FN_AMXX_DETACH(void);
#endif // FN_AMXX_DETTACH #endif // FN_AMXX_DETACH
#ifdef FN_AMXX_PLUGINSLOADED #ifdef FN_AMXX_PLUGINSLOADED
void FN_AMXX_PLUGINSLOADED(void); void FN_AMXX_PLUGINSLOADED(void);

View File

@ -305,7 +305,7 @@ void TraceLine_Post(const float *v1, const float *v2, int fNoMonsters, edict_t *
RETURN_META(MRES_IGNORED); RETURN_META(MRES_IGNORED);
} }
void FN_META_ATTACH() { void OnMetaAttach() {
CVAR_REGISTER (&init_tfcstats_maxsize); CVAR_REGISTER (&init_tfcstats_maxsize);
CVAR_REGISTER (&init_tfcstats_reset); CVAR_REGISTER (&init_tfcstats_reset);
@ -321,7 +321,7 @@ void FN_META_ATTACH() {
} }
void FN_AMXX_ATTACH() { void OnAmxxAttach() {
MF_AddNatives( stats_Natives ); MF_AddNatives( stats_Natives );
MF_AddNatives( base_Natives ); MF_AddNatives( base_Natives );
@ -349,7 +349,7 @@ void FN_AMXX_ATTACH() {
} }
void FN_AMXX_Detach() { void OnAmxxDetach() {
g_grenades.clear(); g_grenades.clear();
g_rank.clear(); g_rank.clear();
g_rank.unloadCalc(); g_rank.unloadCalc();

View File

@ -29,7 +29,7 @@
// Do native functions init here (MF_AddNatives) // Do native functions init here (MF_AddNatives)
#define FN_AMXX_ATTACH OnAmxxAttach #define FN_AMXX_ATTACH OnAmxxAttach
// AMXX dettach // AMXX dettach
//#define FN_AMXX_DETTACH OnAmxxDettach #define FN_AMXX_DETACH OnAmxxDetach
// All plugins loaded // All plugins loaded
// Do forward functions init here (MF_RegisterForward) // Do forward functions init here (MF_RegisterForward)
//#define FN_AMXX_PLUGINSLOADED OnPluginsLoaded //#define FN_AMXX_PLUGINSLOADED OnPluginsLoaded
@ -49,7 +49,7 @@
// Meta attach // Meta attach
#define FN_META_ATTACH OnMetaAttach #define FN_META_ATTACH OnMetaAttach
// Meta dettach // Meta dettach
#define FN_META_DETTACH OnMetaDettach //#define FN_META_DETACH OnMetaDetach
// (wd) are Will Day's notes // (wd) are Will Day's notes
// - GetEntityAPI2 functions // - GetEntityAPI2 functions

View File

@ -257,9 +257,9 @@ void FN_META_QUERY(void);
void FN_META_ATTACH(void); void FN_META_ATTACH(void);
#endif // FN_META_ATTACH #endif // FN_META_ATTACH
#ifdef FN_META_DETTACH #ifdef FN_META_DETACH
void FN_META_DETTACH(void); void FN_META_DETACH(void);
#endif // FN_META_DETTACH #endif // FN_META_DETACH
@ -1869,9 +1869,9 @@ void FN_AMXX_QUERY(void);
void FN_AMXX_ATTACH(void); void FN_AMXX_ATTACH(void);
#endif // FN_AMXX_ATTACH #endif // FN_AMXX_ATTACH
#ifdef FN_AMXX_DETTACH #ifdef FN_AMXX_DETACH
void FN_AMXX_DETTACH(void); void FN_AMXX_DETACH(void);
#endif // FN_AMXX_DETTACH #endif // FN_AMXX_DETACH
#ifdef FN_AMXX_PLUGINSLOADED #ifdef FN_AMXX_PLUGINSLOADED
void FN_AMXX_PLUGINSLOADED(void); void FN_AMXX_PLUGINSLOADED(void);

View File

@ -273,7 +273,7 @@ void TraceLine_Post(const float *v1, const float *v2, int fNoMonsters, edict_t *
RETURN_META(MRES_IGNORED); RETURN_META(MRES_IGNORED);
} }
void FN_META_ATTACH() { void OnMetaAttach() {
CVAR_REGISTER (&init_tsstats_maxsize); CVAR_REGISTER (&init_tsstats_maxsize);
CVAR_REGISTER (&init_tsstats_reset); CVAR_REGISTER (&init_tsstats_reset);
@ -289,7 +289,7 @@ void FN_META_ATTACH() {
} }
void FN_AMXX_ATTACH() { void OnAmxxAttach() {
gKnifeOffset = TSKNIFE_OFFSET; gKnifeOffset = TSKNIFE_OFFSET;
@ -308,7 +308,7 @@ void FN_AMXX_ATTACH() {
} }
} }
void FN_AMXX_Detach() { void OnAmxxDetach() {
g_rank.clear(); g_rank.clear();
g_rank.unloadCalc(); g_rank.unloadCalc();
g_damage_info.clear(); g_damage_info.clear();

View File

@ -29,7 +29,7 @@
// Do native functions init here (MF_AddNatives) // Do native functions init here (MF_AddNatives)
#define FN_AMXX_ATTACH OnAmxxAttach #define FN_AMXX_ATTACH OnAmxxAttach
// AMXX dettach // AMXX dettach
#define FN_AMXX_DETTACH OnAmxxDettach #define FN_AMXX_DETACH OnAmxxDetach
// All plugins loaded // All plugins loaded
// Do forward functions init here (MF_RegisterForward) // Do forward functions init here (MF_RegisterForward)
//#define FN_AMXX_PLUGINSLOADED OnPluginsLoaded //#define FN_AMXX_PLUGINSLOADED OnPluginsLoaded
@ -49,7 +49,7 @@
// Meta attach // Meta attach
#define FN_META_ATTACH OnMetaAttach #define FN_META_ATTACH OnMetaAttach
// Meta dettach // Meta dettach
//#define FN_META_DETTACH OnMetaDettach //#define FN_META_DETACH OnMetaDetach
// (wd) are Will Day's notes // (wd) are Will Day's notes
// - GetEntityAPI2 functions // - GetEntityAPI2 functions