Hi. I've tried to combine 2 plugins using same orpheu function, and i can't get it to work. obviously same function is registered twice as same as the hook. What can i do ?
Code:
new OrpheuHook:handlePrintf
public TaskShowFPS()
{
.....
new OrpheuHook:hHandlePrintf = OrpheuRegisterHook( OrpheuGetFunction( "Con_Printf" ), "Con_Printf" );
}
public OrpheuHookReturn:Con_Printf( const a[ ], const szMessage[ ] )
{
copy( g_szStatsResult, charsmax( g_szStatsResult ), szMessage );
return OrpheuSupercede;
}
public OrpheuHookReturn:OrpheuHookPre(const a[], const b[] , const c[] )
{
handlePrintf = OrpheuRegisterHook( OrpheuGetFunction( "Con_Printf" ), "Con_Printf" , OrpheuHookPre);
return OrpheuIgnored;
}
public OrpheuHookReturn:Con_Printf(const a[], const b[])
{
if (containi(b,"testing")>-1)
{
new msg[256]
copy(msg,255,b)
del_log(msg)
return OrpheuSupercede;
}
return OrpheuIgnored;
}