hmm lol the function prototype actually is
Code:
native callfunc_begin(const func[], const plugin[]="");
looks like we have messed it up in the include file
anyways, here is an example:
Code:
callfunc_begin("my_function", "theplugin.amx");
callfunc_push_int(4);
callfunc_push_str("Hello");
callfunc_push_float(myfloatvalue);
new returnValue = callfunc_end();
this will call the public function my_function in the plugin theplugin.amx, the first parameter will be 4, the second parameter will be "Hello", the third parameter will be the value of myfloatvalue variable / constant / whatever. In returnValue, the return value will be stored ;]
callfunc_push_int: push the value of the integer
used with normal parameters
callfunc_push_intrf: push the reference to the variable
used with &prm parameters
callfunc_push_float: push the value of the float
used with Float:prm parameters
callfunc_push_floatrf: push the reference to the float variable
used with &Float:prm parameters
callfunc_push_str: push a string (an array)
used with prm[] / const prm[] parameters
A native like
callfunc(func, plugin, param1, param2, param2);
is not possible / very very hard to implement.
__________________