Welcome, Guest.

Author Topic: RunCommand won't hook  (Read 724 times)

Offline asdqwe1548

  • Posts: 11
    • View Profile
RunCommand won't hook
« on: August 19, 2018, 04:08:28 AM »
I really didn't want to make this thread but I cannot figure out why RunCommand will not hook, the hook doesn't crash it just isn't called.

Code:
constexpr int run_cmd = 18;
 
static void __stdcall run_command(c_base_entity* player, CUserCmd* ucmd, IMoveHelper* moveHelper);
 
typedef void(__stdcall* run_cmd_t)   (CPrediction*, c_base_entity*, CUserCmd*, IMoveHelper*);
 
void hooks::run_command(c_base_entity* player, CUserCmd* ucmd, IMoveHelper* moveHelper)
{
    static auto original = g_hooks.prediction_hook->original<run_cmd_t> (idx::run_cmd);
 
   std::cout << "runcmd" << std::endl;
   original(g_prediction, player, ucmd, moveHelper);
}
How I am getting CPrediction:
Code:
g_prediction = get_interface<CPrediction>("client.dll", "VClientPrediction001");
I also tried using __fastcall and setting ecx and edx registers as arguments.
I am 99% sure the index is right as I checked on the dylib and dll.


Total Registered Members:





2017-2023 BigPackets. All rights reserved. All other trademarks, logos and copyrights are the property of their respective owners. This site is not associated with any company in any way.