AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   a question about orpheu (https://forums.alliedmods.net/showthread.php?t=154695)

Jacob 04-11-2011 23:45

a question about orpheu
 
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!


All times are GMT -4. The time now is 19:53.

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