Welcome, Guest.

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

Offline asdqwe1548

  • Level 1 - Noob
  • *
  • Posts: 11
    • View Profile
  • Korea, Republic of
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.

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:
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 Members

  • Youtube Youtube
  • Facebook Facebook
  • Twitter Twitter
  • Steam Steam

  • Powered by SMF | SMF © 2018, Simple Machines

    2018 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.