View Single Post
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-23-2010 , 03:53   Re: Module: Orpheu2.3
Reply With Quote #294

Quote:
can someone update this code to 2.3?
Code:
    #include <amxmodx>     #include <orpheu>     new Msg[ 100 ];     public plugin_precache()     {         register_srvcmd( "catch", "catch" );     }         public catch()     {         new OrpheuHook:handlePrintf = OrpheuRegisterHook( OrpheuGetFunction( "Con_Printf" ), "Con_Printf" );                 server_cmd( "stats" );         server_exec();                 OrpheuUnregisterHook( handlePrintf );         const tokensN  = 7;         const tokenLen = 19;                 static tokens[ tokensN ][ tokenLen + 1 ];         for ( new i = 0; i < tokensN; i++ )         {             trim( Msg );             strtok( Msg, tokens[ i ], tokenLen, Msg, charsmax( Msg ), ' ' );         }         new Float:cpu = str_to_float( tokens[ 0 ] );         new Float:in  = str_to_float( tokens[ 1 ] );         new Float:out = str_to_float( tokens[ 2 ] );         new uptime    = str_to_num  ( tokens[ 3 ] );         new users     = str_to_num  ( tokens[ 4 ] );         new Float:fps = str_to_float( tokens[ 5 ] );         new players   = str_to_num  ( tokens[ 6 ] );         server_print( "CPU[%f] IN[%f] OUT[%f] UPTIME[%d] USERS[%d] FPS[%f] PLAYERS[%d]", cpu, in, out, uptime, users, fps, players );     }     public OrpheuHookReturn:Con_Printf( const a[], const message[] )     {         copy( Msg,charsmax( Msg ), message );         return OrpheuSupercede;     }

Code:
{     "name" : "Con_Printf",     "library" : "engine",     "arguments" :     [         {             "type" : "char *"         },         {             "type" : "char *"         }     ],     "identifiers" :     [         {             "os"    : "windows",             "mod"   : "cstrike",             "value" : [0x55,0x8B,"*",0xB8,"*","*","*","*",0xE8,"*","*","*","*",0x8B,0x4D,"*",0x8D,0x45,"*",0x50,0x51,0x8D,0x95,"*","*","*","*",0x68,"*","*","*","*",0x52,0xE8,"*","*","*","*",0x8D,0x85,"*","*","*","*",0x50]         },         {             "os"    : "linux",             "mod"   : "cstrike",             "value" : "Con_Printf"         }     ] }
__________________

Last edited by Arkshine; 06-22-2011 at 14:01.
Arkshine is offline