View Single Post
Author Message
Keeper
Senior Member
Join Date: Nov 2006
Old 06-24-2009 , 22:41   g_pGameRules question
Reply With Quote #1

Ok, I've found the game rules via scanning (HL2MP). What am I supposed to do next? I need to hook some functions, and have tried and gotten an error reading that address. Maybe I've scanned for the wrong address, but I want to make sure that I'm thinking right so I can know when I get the right one.

Let's say I want to hook CGameRules:: DeathNotice

Assuming I scan for the g_pGameRules correctly, I use the following to hook that function:
Code:
SH_ADD_HOOK_MEMFUNC ( CGameRules, DeathNotice, g_pMyGameRules, &gPlugin, &CPlugin::MyDeathNotice, PRE );
Is my thinking right?

And no, I'm not using SDK tools...
Keeper is offline