Quote:
Originally Posted by HamletEagle
callfunc_end will return whatever you returned in the target function. PLUGIN_* are just numbers.
|
I know PLUGIN_* are just numbers, I just didn't know about callfunc_end returning.
So basically like this?
PHP Code:
public OnShopMenuHandler( id, iMenu, iItem )
{
// code
callfunc_begin_i( eItemData[ iItemFuncID ], eItemData[ iItemPlugin ] )
callfunc_push_int( id )
if( callfunc_end( ) == PLUGIN_HANDLED )
{
return PLUGIN_HANDLED;
}
// code
return PLUGIN_CONTINUE;
}
PHP Code:
public plugin_init( )
{
register_extra_item( "Item Name", ITEM_COST "CallBackHandler" );
}
public CallBackHandler( id )
{
return PLUGIN_HANDLED;
}
__________________