From 2d0e12363f8e20a63671cf944b4ef5d6f5775a76 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 1 Feb 2006 11:54:57 +0000 Subject: [PATCH] added include defs for new forward creation --- plugins/include/amxconst.inc | 10 ++++++++++ plugins/include/amxmodx.inc | 31 +++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/plugins/include/amxconst.inc b/plugins/include/amxconst.inc index 1b92cf4d..ba273f9d 100755 --- a/plugins/include/amxconst.inc +++ b/plugins/include/amxconst.inc @@ -286,3 +286,13 @@ enum { #define AMX_ERR_PARAMS 25 #define INVALID_HANDLE -1 + +#define ET_IGNORE 0 //ignore return val +#define ET_STOP 1 //stop on PLUGIN_HANDLED +#define ET_STOP2 2 //same, except return biggest +#define ET_CONTINUE 3 //no stop, return biggest + +#define FP_CELL 0 +#define FP_FLOAT 1 +#define FP_STRING 2 +#define FP_ARRAY 4 \ No newline at end of file diff --git a/plugins/include/amxmodx.inc b/plugins/include/amxmodx.inc index b7c7d062..c3eec924 100755 --- a/plugins/include/amxmodx.inc +++ b/plugins/include/amxmodx.inc @@ -928,3 +928,34 @@ native get_addr_val(addr); native set_addr_val(addr, val); +/** + * creates a multi-plugin forward. + * results will be > 0 for success + */ +native CreateMultiForward(const name[], stop_type, ...); + +/** + * creates a forward for one plugin. + * results will be > 0 for success + * id can be returned from find_plugin_byfile or + * anything get_plugin is compatible with. + */ +native CreateOneForward(plugin_id, const name[], ...); + +/** + * prepares an array. use this and pass the result into + * ExecuteForward() instead of the array itself. + */ +native PrepareArray(array[], size, copyback=0); + +/** + * executes a forward. returns result in ret. + * returns 1 for success, 0 for failure. + */ +native ExecuteForward(forward_handle, &ret, ...); + +/** + * Destroys/deallocates any type of forward + */ +native DestroyForward(forward_handle); +