Raised This Month: $ Target: $400
 0% 

Combine 2 orpheu plugin functions


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
EDUTz
Senior Member
Join Date: Jun 2010
Location: Dracula's Homeland
Old 02-19-2013 , 23:28   Combine 2 orpheu plugin functions
Reply With Quote #1

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; 
}
EDUTz is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode