Actually BAILOPAN, there is a VERY specific reason I did not do it that way.
You could make a very simple function to make a callback using the callfunc functions:
Code:
new send_callback(function[])
{
new funcid = funcidx ( function )
callfunc_begin_i(funcid)
callfunc_end()
while(funcid)
{
etc etc
Just like finding all of the entities in a map and removing them.
HOWEVER, what if you want to make a callback that is NOT plugin specific? the callfunc_begin_i forces you to put in a plugin name, or its just done in the calling plugin!
That wont do for what I wanted to do, which is allow people to plugin in new modules and receive the callback if they like. I'd have to hardcode every plugin I want to call into the callback function!
In addition, I want the callback to obey the sequence of plugins. When you send a server command, it goes through each plugin in sequence, unless I am wrong. Which means you can block it, thus adding or removing functionality. I like to use my method as sort of a callback to make sure all plugins send the hud_message adding in sequence, so it doesnt screw up.
So your method does not work for what I want, which is a true callback like toucher from engine, in which you can block it and such, and it goes to any plugin trying to catch it, no hard coding needed.
You should ADD a function that calls the function in all of the plugins, so its plugin inspecific. That would actually be useful for what I need it to do.
Until then, this method is useful.
If I didn't say it before, I could be wrong, and the function I need is hiding somewhere. I did look around, but maybe I'm just not seeing it.
__________________