diff --git a/amxmodx/CForward.cpp b/amxmodx/CForward.cpp index 74d023a0..6c316c1f 100755 --- a/amxmodx/CForward.cpp +++ b/amxmodx/CForward.cpp @@ -480,6 +480,16 @@ void CForwardMngr::unregisterSPForward(int id) m_FreeSPForwards.push(id); } +int registerForwardC(const char *funcName, ForwardExecType et, cell *list, size_t num) +{ + ForwardParam params[FORWARD_MAX_PARAMS]; + + for (size_t i=0; i(list[i]); + + return g_forwards.registerForward(funcName, et, num, params); +} + int registerForward(const char *funcName, ForwardExecType et, ...) { int curParam = 0; @@ -509,6 +519,16 @@ int registerForward(const char *funcName, ForwardExecType et, ...) return g_forwards.registerForward(funcName, et, curParam, params); } +int registerSPForwardByNameC(AMX *amx, const char *funcName, cell *list, size_t num) +{ + ForwardParam params[FORWARD_MAX_PARAMS]; + + for (size_t i=0; i(list[i]); + + return g_forwards.registerSPForward(funcName, amx, num, params); +} + int registerSPForwardByName(AMX *amx, const char *funcName, ...) { int curParam = 0; diff --git a/amxmodx/CForward.h b/amxmodx/CForward.h index 28ff4d3f..8eea581c 100755 --- a/amxmodx/CForward.h +++ b/amxmodx/CForward.h @@ -46,6 +46,7 @@ #ifndef FORWARD_H #define FORWARD_H +#include #include "sh_stack.h" const int FORWARD_MAX_PARAMS = 32; @@ -213,7 +214,9 @@ public: // (un)register forward int registerForward(const char *funcName, ForwardExecType et, ...); +int registerForwardC(const char *funcName, ForwardExecType et, cell *list, size_t num); int registerSPForwardByName(AMX *amx, const char *funcName, ...); +int registerSPForwardByNameC(AMX *amx, const char *funcName, cell *list, size_t num); int registerSPForward(AMX *amx, int func, ...); void unregisterSPForward(int id);