This is how I would do it.
I will create a forward that will execute after the plugins have been loaded in the main plugin that holds the defines.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define DEFINE 4
#define PLUGIN "Fake Forward"
#define AUTHOR "OT"
#define VERSION "1.0"
new g_forward
new g_return
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
g_forward = CreateMultiForward("api_get_the_defines",ET_IGNORE,FP_CELL)
set_task(0.5,"plugin_spread_defines")
}
public plugin_spread_defines()
{
ExecuteForward(g_forward,g_return,DEFINE)
DestroyForward(g_forward)
}
To hook the forward in your plugins you need to put the function name
PHP Code:
public api_get_the_defines(define)
{
X = define
}
Anyway this will be helpfull ->
PLUGIN API TUTORIAL
__________________