affe2626 (10-10-2016)
Hey, I'm trying to hook DrawModelExecute. And in my hook, when i dont call the original one, I wont crash but obviously all my models are invisible. So when i try to call the original like i do with other hooks, my game just crashes. Attaching a debugger, I'm getting "Exception thrown at 0x0C9FBD96 (engine.dll) in csgo.exe: 0xC0000005: Access violation reading location 0x000A0503.
Don't really know what that's suposed to mean.
Anyways, here's my hook.
void __stdcall Hooks::Hooked_DrawModelExecute(void* context, void* state, const ModelRenderInfo_t &pInfo, SourceEngine::matrix3x4_t *pCustomBoneToWorld)
{
oDrawModelExecute(context, state, pInfo, pCustomBoneToWorld);
}
Thanks in advance
affe2626 (10-10-2016)
In my hook.h
typedef void(__stdcall * DrawModelExecuteFn)(void*, void*, const ModelRenderInfo_t&, SourceEngine::matrix3x4_t*);
extern DrawModelExecuteFn oDrawModelExecute;
void __stdcall Hooked_DrawModelExecute(void* context, void* state, const ModelRenderInfo_t &pInfo,SourceEngine::matrix3x4_t *pCustomBoneToWorld);
in my hook.cpp
std::unique_ptr<VFTableHook> g_ModelRender = nullptr;
DrawModelExecuteFn oDrawModelExecute = nullptr;
g_ModelRender = make_unique<VFTableHook>((PPDWORD)SourceEngine::In terfaces::ModelRender(), true);
oDrawModelExecute = g_ModelRender->Hook(21, (DrawModelExecuteFn)Hooked_DrawModelExecute);
this is what I do. When i put another hook in like overrideview or painttraverse, it worked flawlessly. So im clueless.
It most likely has something to do with calling the original one though.
I think you're reading from the "0x000A0503" address in memory which you don't have permission to do, check for nullptr's and such. I'm not so good at hooking so i don't really know what it is but i assume it's that.
You also have a really nice name + country, insta +rep
Last edited by affe2626; 10-10-2016 at 01:34 PM.
Always PM me when trading, I've been hacked on my Skype previously
[img]https://**********.com/addskype/affe2626.png[/img]
affe2626 (10-11-2016)
idk but , try removing what @affe2626 said and that Interfaces::ModelRender(), ture
Current Projects:TurtleCheat GlowESP BunnyHopHelixGlow (With Permission from nullptr_t)
Been over a week since last update/bump after answers, assuming solved.
/Closed.