Hy there!
Can I create native functions that accept function names as parameters?
Like this...
PHP Code:
register_touch("func_wall", "player" "OnPlayerWallTouch");
PHP Code:
public OnPlayerWallTouch(const iEntityId, const iId) {}
Where "OnPlayerWallTouch" is a function's name.
My Case:
The Sub Plugin call this native function.
PHP Code:
RegisterSomething("Anything", 1337, "MyFunction");
The Main Plugins stores this data. Any whenever something happen this will trigger all the functions are registered with "RegisterSomething". In this case "MyFunction" will be called inside of the sub plugin.
Like forwards just not exactly. If something happen in main they notice the sub plugins are subscribed with this function.
Is it cleaner? Thank you!
Edit:
I think I found the solution. I was looking for "callfunc_begin" and "callfunc_end". The only think I have to store the plugin and the function's name.