diff --git a/amxmodx/sdk/amxxmodule.cpp b/amxmodx/sdk/amxxmodule.cpp index 08a6cb97..b021ab49 100755 --- a/amxmodx/sdk/amxxmodule.cpp +++ b/amxmodx/sdk/amxxmodule.cpp @@ -2474,6 +2474,9 @@ PFN_LOAD_AMXSCRIPT g_fn_LoadAmxScript; PFN_UNLOAD_AMXSCRIPT g_fn_UnloadAmxScript; PFN_REAL_TO_CELL g_fn_RealToCell; 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 *** C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo) @@ -2542,6 +2545,9 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES); REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR); 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("PrepareCellArray", g_fn_PrepareCellArray, PFN_PREPARE_CELLARRAY); REQFUNC("PrepareCharArray", g_fn_PrepareCharArray, PFN_PREPARE_CHARARRAY); @@ -2616,7 +2622,7 @@ void MF_Log(const char *fmt, ...) #ifdef _DEBUG // validate macros // Makes sure compiler reports errors when macros are invalid -void ValidateMacros() +void ValidateMacros_DontCallThis_Smiley() { MF_BuildPathname("str", "str", 0); MF_FormatAmxString(NULL, 0, 0, NULL); @@ -2662,6 +2668,9 @@ void ValidateMacros() MF_AmxAllot(0, 0, 0, 0); MF_LoadAmxScript(0, 0, 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 diff --git a/amxmodx/sdk/amxxmodule.h b/amxmodx/sdk/amxxmodule.h index 8184c85c..b548edf1 100755 --- a/amxmodx/sdk/amxxmodule.h +++ b/amxmodx/sdk/amxxmodule.h @@ -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 cell (*PFN_REAL_TO_CELL) (REAL /*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_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_REAL_TO_CELL g_fn_RealToCell; 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 // Function prototypes for intellisense and similar systems @@ -2044,6 +2050,9 @@ int MF_GetPlayerArmor (int id) { } int MF_GetPlayerHealth (int id) { } REAL amx_ctof (cell 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 #define MF_AddNatives g_fn_AddNatives @@ -2093,6 +2102,9 @@ void MF_Log(const char *fmt, ...); #define MF_UnloadAmxScript g_fn_UnloadAmxScript #define amx_ctof g_fn_CellToReal #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 ***/ void *operator new(size_t reportedSize);