Thread: [Solved] callfunc_* alternative
View Single Post
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-13-2019 , 09:16   Re: callfunc_* alternative
Reply With Quote #2

Quote:
Originally Posted by edon1337 View Post
I'm using callfunc_* natives in my plugin so I can register items in a menu from external plugins, but with callfunc_* you don't have the ability of returning PLUGIN_HANDLED in the external plugin and then blocking the function in the main plugin.
PLUGIN_HANDLED is just a magic number. You can check for it and act accordingly, i.e. don't continue with whatever action is taking place.


Quote:
Originally Posted by edon1337 View Post
I was thinking of using this but it differs from my usage

The usage shown in the link:
PHP Code:
public plugin_init( )

    
some_native("MyFunction"); 


public 
MyFunction(param

    return 
1;

My usage:
PHP Code:
public plugin_init( )

    
some_native"Item Name"Itemcost"CallBackHandler" );


public 
CallBackHandlerid 

    
client_printidprint_chat"Hello there!" );

Can CreateOneForward be used in the form that I'm using callfunc?
How are these different? The number of parameters doesn't matter.
__________________
klippy is offline