/**
* Initiates a function call to this or another plugin by function name.
*
* @note This only sets up the function call and covers the pre-requisites.
* Push parameters using the callfunc_push_* set of functions. The call
* will be executed only upon using callfunc_end()
*
* @param func Function name
* @param plugin Plugin filename. If empty the calling plugin is targeted.
* The filename has to be the full exact name (e.g. stats.amxx)
*
* @return 1 on success
* 0 on runtime error
* -1 if plugin was not found
* -2 if function was not found
* @error If called while another callfunc has not yet been finished,
* an error is thrown.
*/
native callfunc_begin(const func[], const plugin[]="");
/**
* Initiates a function call to this or another plugin by function id.
*
* @note This only sets up the function call and covers the pre-requisites.
* Push parameters using the callfunc_push_* set of functions. The call
* will be executed only upon using callfunc_end()
* @note The function id can be retrieved by get_func_id()
*
* @param func Function id
* @param plugin Plugin filename. If empty the calling plugin is targeted.
* The filename has to be the full exact name (e.g. stats.amxx)
*
* @return 1 on success
* -1 if plugin was not found
* -2 if function is not executable
* @error If called while another callfunc has not yet been finished,
* or the specified function is invalid, an error is thrown.
*/
native callfunc_begin_i(func, plugin=-1);
/**
* Retrieves a functions id for use with callfunc_begin_i()
*
* @param funcName Function name
* @param pluginId Plugin id. If -1 the calling plugin is targeted. The plugin
* id can be retrieved using find_plugin_byfile()
*
* @return >0 Function id on success
* -1 if plugin or function was not found
*/
native get_func_id(const funcName[], pluginId=-1);
/**
* Pushes an int value onto the current call.
*
* @param value Int value to push
*
* @noreturn
* @error If called without initiating a callfunc, or the maximum
* amount of parameters is reached, an error is thrown.
*/
native callfunc_push_int(value);
/**
* Pushes a float value onto the current call.
*
* @param value Float value to push
*
* @noreturn
* @error If called without initiating a callfunc, or the maximum
* amount of parameters is reached, an error is thrown.
*/
native callfunc_push_float(Float: value);
/**
* Pushes an int value reference onto the current call.
*
* @note Changes made to this value by the called function will be reflected
* in the calling plugin.
*
* @param value Int value to push
*
* @noreturn
* @error If called without initiating a callfunc, or the maximum
* amount of parameters is reached, an error is thrown.
*/
native callfunc_push_intrf(&value);
/**
* Pushes a float value reference onto the current call.
*
* @note Changes made to this value by the called function will be reflected
* in the calling plugin.
*
* @param value Float value to push
*
* @noreturn
* @error If called without initiating a callfunc, or the maximum
* amount of parameters is reached, an error is thrown.
*/
native callfunc_push_floatrf(&Float:value);
/**
* Pushes a string onto the current call.
*
* @note This will defy the "const" specifier if copyback is true, which is
* only kept for special backwards compatibility.
*
* @param VALUE String to push
* @param copyback If true any changes made in the called function will be
* copied back to the calling plugin.
*
* @noreturn
* @error If called without initiating a callfunc, or the maximum
* amount of parameters is reached, an error is thrown.
*/
native callfunc_push_str(const VALUE[], bool:copyback=true);
/**
* Pushes an array onto the current call.
*
* @note This will defy the "const" specifier if copyback is true, which is
* only kept for special backwards compatibility.
*
* @param VALUE Array to push
* @param array_size Size of the array
* @param copyback If true any changes made in the called function will be
* copied back to the calling plugin.
*
* @noreturn
* @error If called without initiating a callfunc, or the maximum
* amount of parameters is reached, an error is thrown.
*/
native callfunc_push_array(const VALUE[], array_size, bool:copyback=true);
/**
* Completes the call to a function.
*
* @return 1 on success
* -1 if the plugin was not found
* -2 if the function was not found
* @error If called without initiating a callfunc an error is thrown.
*/
native callfunc_end();
You could also you xvars or forwards, depending on your situation
__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.
I just wanted to expose aspects of my plugin to other plugin makers (probably just myself but in modules). I think I will use natives for this purpose.