Results 1 to 7 of 7
  1. #1
    affenaff's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    24
    Reputation
    10
    Thanks
    8
    My Mood
    Asleep

    Need help with DrawModelExecute

    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

  2. The Following User Says Thank You to affenaff For This Useful Post:

    affe2626 (10-10-2016)

  3. #2
    WildAssassinz's Avatar
    Join Date
    May 2016
    Gender
    male
    Posts
    502
    Reputation
    30
    Thanks
    467
    My Mood
    Angry
    Quote Originally Posted by affenaff View Post
    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
    How do you initialize the hook?
    Current Projects:
    TurtleCheat GlowESP BunnyHop
    HelixGlow (With Permission from nullptr_t)

  4. #3
    affenaff's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    24
    Reputation
    10
    Thanks
    8
    My Mood
    Asleep
    Quote Originally Posted by WildAssassinz View Post
    How do you initialize the hook?
    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.

  5. #4
    affe2626's Avatar
    Join Date
    Apr 2015
    Gender
    male
    Location
    Sweden
    Posts
    552
    Reputation
    146
    Thanks
    151
    My Mood
    Angelic
    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]

  6. #5
    affenaff's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    24
    Reputation
    10
    Thanks
    8
    My Mood
    Asleep
    Quote Originally Posted by affe2626 View Post
    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
    man bockar och bugar.

    +rep'd back

  7. The Following User Says Thank You to affenaff For This Useful Post:

    affe2626 (10-11-2016)

  8. #6
    WildAssassinz's Avatar
    Join Date
    May 2016
    Gender
    male
    Posts
    502
    Reputation
    30
    Thanks
    467
    My Mood
    Angry
    Quote Originally Posted by affenaff View Post
    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.
    idk but , try removing what @affe2626 said and that Interfaces::ModelRender(), ture
    Current Projects:
    TurtleCheat GlowESP BunnyHop
    HelixGlow (With Permission from nullptr_t)

  9. #7
    Smoke's Avatar
    Join Date
    Nov 2014
    Gender
    male
    Posts
    11,899
    Reputation
    2661
    Thanks
    4,610
    My Mood
    Amazed
    Been over a week since last update/bump after answers, assuming solved.

    /Closed.


    CLICK TO BUY NOW!!


    Quote Originally Posted by Liz View Post
    This is my first vouch, ever. Rapidgator account worked perfectly. Would buy in the future.

Similar Threads

  1. [Help Request] Need Help With A.V.A Error
    By ch1025 in forum Alliance of Valiant Arms (AVA) Help
    Replies: 7
    Last Post: 05-14-2011, 09:15 AM
  2. [Help Request] Need help with making binds !
    By JonathanTBM in forum Vindictus Help
    Replies: 4
    Last Post: 05-10-2011, 07:40 PM
  3. [Help Request] Need help with numpad while recording macro !
    By JonathanTBM in forum Vindictus Help
    Replies: 2
    Last Post: 05-10-2011, 07:37 PM
  4. [Help Request] need help with mod
    By .:MUS1CFR34K:. in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 4
    Last Post: 05-01-2011, 12:40 PM
  5. [Help Request] need help with modding
    By BayBee Alyn in forum Combat Arms Help
    Replies: 0
    Last Post: 04-27-2011, 09:06 PM