Raised This Month: $ Target: $400
 0% 

[ORPHEU] Blocking function and sending new value


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 10-30-2011 , 17:27   [ORPHEU] Blocking function and sending new value
Reply With Quote #1

Is it possible to do something like this?
I want to hook _SV_CalcClientTime, i made a signature for linux
Code:
{
    "name"       : "SV_CalcClientTime",
    "arguments"  :
    [
        {
            "type" : "int"
        }
    ],
    "library"    : "engine",
    "identifiers":
    [
        {
            "os"    : "windows",
            "mod"   : "cstrike",
            "value" : 0
        },
        {
            "os"    : "linux",
            "mod"   : "cstrike",
            "value" : "_SV_CalcClientTime"
        }
    ]
}
First i'm not sure is it good, because IDA shows function name as
"_SV_CalcClientTime", but when i open function i see "SV_CalcClientTime"
still not sure what to use.

And i don't know how to block function and send different value?
I tried something like this, but it doesn't block
Code:
#include <amxmodx>
#include <orpheu>

public plugin_init()
{
	new OrpheuFunction:CalcTime = OrpheuGetFunction("SV_CalcClientTime","CalcTime")
	OrpheuRegisterHook(CalcTime, "CalculatePlayedTime", OrpheuHookPre)
}

public OrpheuHookReturn:CalculatePlayedTime()
	return OrpheuSupercede;

Last edited by OvidiuS; 10-30-2011 at 17:32.
OvidiuS is offline
Send a message via Skype™ to OvidiuS
 


Thread Tools
Display Modes

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 14:22.


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