Raised This Month: $ Target: $400
 0% 

a question about orpheu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jacob
Senior Member
Join Date: Oct 2010
Old 04-11-2011 , 23:45   a question about orpheu
Reply With Quote #1

PHP Code:
#include <amxmodx>
    #include <orpheu>
    
new Msg100 ];
    public 
plugin_precache()
    {
        
register_srvcmd"catch""catch" );
    }    
    public catch()
    {
        new 
OrpheuHook:handlePrintf OrpheuRegisterHookOrpheuGetFunction"Con_Printf" ), "Con_Printf" );
        
        
server_cmd"stats" );
        
server_exec();
        
        
OrpheuUnregisterHookhandlePrintf );
        const 
tokensN  7;
        const 
tokenLen 19;
        
        static 
tokenstokensN ][ tokenLen ];
        for ( new 
0tokensNi++ )
        {
            
trimMsg );
            
strtokMsgtokens], tokenLenMsgcharsmaxMsg ), ' ' ); 
        }
        new 
Float:cpu str_to_floattokens] );
        new 
Float:in  str_to_floattokens] );
        new 
Float:out str_to_floattokens] );
        new 
uptime    str_to_num  tokens] );
        new 
users     str_to_num  tokens] );
        new 
Float:fps str_to_floattokens] );
        new 
players   str_to_num  tokens] );
        
server_print"CPU[%f] IN[%f] OUT[%f] UPTIME[%d] USERS[%d] FPS[%f] PLAYERS[%d]"cpuinoutuptimeusersfpsplayers );
    }
    public 
OrpheuHookReturn:Con_Printf( const a[], const message[] )
    {
        
copyMsg,charsmaxMsg ), message );
        return 
OrpheuSupercede;
    } 
i used this plugin,when i type catch in console,it showed the error message:
PHP Code:
] catch
L 04/12/2011 11:29:31: [ORPHEU] Function "Con_Printf" not found
L 04
/12/2011 11:29:31: [AMXXDisplaying debug trace (plugin "test.amxx")
L 04/12/2011 11:29:31: [AMXXRun time error 10native error (native "OrpheuGetFunction")
L 04/12/2011 11:29:31: [AMXX]    [0test.sma::catch (lin 
PS:i have installed the module orpheu and signature 'Con_Printf'.
msg about orpheu when server started:
PHP Code:
Orpheu functions search started.
 
Parsing functions started.
  
Parsing file "Con_Printf" started
    Argument type 
"char *" validated
    Argument type 
"char *" validated
    Searching 
for signature "[0x55][0x8b][0xec][0xb8][0x00](...)" ... NOT FOUND
  Parsing file 
"Con_Printf" ended
 Parsing functions ended
.
Orpheu functions search ended.
Orpheu virtual functions search started.
 
Parsing virtual functions started.
 
Parsing virtual functions ended.
Orpheu virtual functions search ended.
Orpheu memory structures search started.
 
Parsing memory structures started.
 
Parsing memory structures ended.
Orpheu memory 
i can't find where is error, can someone help me,thanks in advance!
Jacob is offline
Reply



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 16:40.


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