I read from Connor that the second parameter is the value returned from the register_plugin native.
So my question is:
When I create a native in one plugin. And I call that native from another one the parameters to the native handler in the main plugin that created the native are iPlugin and iParams. Is the iPlugin the plugin ID that can be used in the Callfun_begin_i native?
Example is below. I typed this out in notepad without highlighting so If i have typos sorry but you should be able to understand the basics of what i need
//Called when a selection is made from a menu of all the classes to call a specific function depending on which class you selected.
public CallFunction(id, iArrayIndex)
{
new szClassName[32], Array:temparray;
temparray = ArrayCreate();
ArrayGetString(g_ClassArray, iArrayIndex, szClassName, charsmax(szClassName));
TrieGetArray(g_ClassInfoTrie, szClassName, temparray, ArraySize(temparray));
new iPlugin = ArrayGetCell(temparray, 0);
callfunc_begin_i(ArrayGetCell(temparray, 1), ArrayGetCell(temparray, 0));
callfunc_push_int(id);
callfunc_end()
}
To explain in text:
I create a native and send the class name and function call back.
I add that class string name to an array.
I add the plugin id and function id to a temp array.
I add the temparray to a trie using the class name as a key.
I delete the temparray. (or try to anyway)
Option selected from menu (not in example thats the easy part)
Use selection to send player index and selection index to the callfunction function
select the classname from the array using the selection index
grab the temp array from the trie using the class name
call the function in the temp array slot 1 in the plugin slot 0