Results 1 to 7 of 7
  1. #1
    fvestrgenrl's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    172
    Reputation
    9
    Thanks
    26

    What's wrong with this?

    Here i put this together, but it crashes immediately after loading...
    Code:
    #include <windows.h>
    bool IsGameReadyForHook()
    {
    if( GetModuleHandleA( "d3d9.dll"     ) != NULL 
    && GetModuleHandleA( "ClientFX.fxd" ) != NULL 
    && GetModuleHandleA( "CShell.dll"   ) != NULL )
    return true;
    return false;
    }
    void PTC(const char* Command) {
    DWORD CNADDIE = 0x007d9200;
    void* Send = ( void* )*( DWORD* )(CNADDIE);
    __asm
    {
    /* CREDITS TO CN */
    push Command;
    call Send; 
    add esp, -4+2+6-1+1;
    }
    } 
    void main()
    {
    while(true)
    {
    PTC("SkelModelStencil 1");
    }
    }
    DWORD WINAPI dwHackThread(LPVOID)
    {
    while( !IsGameReadyForHook() )
    Sleep(100);
    main();
    return 0;
    }
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    DisableThreadLibraryCalls(hDll);
    if ( dwReason == DLL_PROCESS_ATTACH )
    {
    CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
    }
    return TRUE;
    }
    And i packed it with UPX that didn't fix it anything else i should do?

  2. #2
    BloodSkin's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Columbus, OH
    Posts
    353
    Reputation
    11
    Thanks
    63
    PTC("SkelModelStencil 1");

    next line, add
    Sleep(100)

    see if that fixes it. i dont think it will, but it will kill lag, which may be where ur problem lies.

  3. The Following User Says Thank You to BloodSkin For This Useful Post:

    fvestrgenrl (07-21-2010)

  4. #3
    fvestrgenrl's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    172
    Reputation
    9
    Thanks
    26
    Quote Originally Posted by BloodSkin View Post
    PTC("SkelModelStencil 1");

    next line, add
    Sleep(100)

    see if that fixes it. i dont think it will, but it will kill lag, which may be where ur problem lies.
    HAHA that did it thanks dude! thanks/ +rep
    One More question... if i add multiple PTC commands, should i just toss that at the end, or after each one?
    Last edited by fvestrgenrl; 07-21-2010 at 01:56 PM.

  5. #4
    MugNuf's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    790
    Reputation
    9
    Thanks
    160
    My Mood
    Goofy
    Quote Originally Posted by fvestrgenrl View Post
    HAHA that did it thanks dude! thanks/ +rep
    One More question... if i add multiple PTC commands, should i just toss that at the end, or after each one?
    Well, if your C+Ping code together to make an auto on hack, sure.

    If your going to make a hotkey hack, make GetAsyncKeyState functions.

  6. #5
    fvestrgenrl's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    172
    Reputation
    9
    Thanks
    26
    i know that, i'm just learning how a hack works before i code my own

  7. #6
    carterv's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    51
    Reputation
    10
    Thanks
    3
    My Mood
    Devilish
    Keep the sleep right before the closing brace of your while statement.

  8. #7
    zmansquared's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    Kickin it at Microsoft
    Posts
    2,086
    Reputation
    36
    Thanks
    221
    My Mood
    Cheerful
    your hook is bad also...i think
    Need Help With Coding or Something??? MSN me
    zmansquared@hotmail.com


    I am the one and only Microsoft Fag!!!

    Quote:
    Originally Posted by Arhk
    All games should be hacked, if we don't do it someone else will. Hackers force the progress, of better programming methods.
    ~


    Take this Pic everyone!



    next-

Similar Threads

  1. What's wrong with this guy?
    By Mr.Magicman in forum General
    Replies: 15
    Last Post: 06-01-2010, 08:53 AM
  2. What is wrong with this code?
    By t7ancients in forum C++/C Programming
    Replies: 10
    Last Post: 10-19-2009, 01:58 PM
  3. What's wrong with this?
    By yup in forum Visual Basic Programming
    Replies: 4
    Last Post: 03-18-2008, 10:36 AM
  4. what is wrong with this ??
    By floris12345! in forum Visual Basic Programming
    Replies: 5
    Last Post: 01-16-2008, 05:22 PM
  5. what is wrong with this source?
    By Petros in forum C++/C Programming
    Replies: 6
    Last Post: 07-04-2007, 04:33 PM