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;