Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    hgmf8124's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    GTFO Stalker!
    Posts
    106
    Reputation
    10
    Thanks
    17
    My Mood
    Dead

    [ERROR] NumPad Key Hack not working, but others do..

    Hey everybody, sorry for so many questions.. well I'm using CN's source. Then I build it when I finish and I inject it, nothing works (I press Space for Gravity Hack, I press 1 for NX Chams, none work..). And the weird thing is that, every OTHER hotkey/menu hack works for me.. I run on Vista 32bit.

    Source:
    Code:
    #include <windows.h>
    
    bool IsGameReadyForHook()
    {
    if( GetModuleHandleA( "d3d9.dll" ) != NULL 
    && GetModuleHandleA( "ClientFX.fxd" ) != NULL 
    && GetModuleHandleA( "CShell.dll" ) != NULL )
    return true;
    return false;
    }
    
    void PushToConsole(const char* Command) {
    DWORD CNADDIE = 0x007d9200;
    void* Send = ( void* )*( DWORD* )(CNADDIE);
    __asm
    {
    push Command;
    call Send; 
    add esp, -3-1+2+6;
    }
    } 
    
    void main()
    {
    bool gravityHack = false;
    bool chamsHack = false;
    while(true)
    {
    //Gravity Hack
    if(GetAsyncKeyState(VK_SPACE)<0){
    gravityHack = !gravityHack;
    if (gravityHack)
    PushToConsole( "PlayerGravity 800" );
    else
    PushToConsole( "PlayerGravity -800" );
    //NX Chams
    if(GetAsyncKeyState(VK_NUMPAD1)<0){
    chamsHack = !chamsHack;
    if (chamsHack)
    PushToConsole( "SkelModelStencil 1" );
    else
    PushToConsole( "SkelModelStencil 0" );
    } 
    }
    Sleep(200);
    }
    }
    When I build it, there are NO ERRORS. (Yesterday got help) But still, when I inject it, the keys don't work. And the weird thing is that, every OTHER hotkey/menu hack works for me.. I run on Vista 32bit.

    SO, IF YOU COULD HELP ME, PLEASE COMMENT OR PM ME. THANKS! :(

  2. #2
    NOOBJr's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    in NOOB
    Posts
    1,426
    Reputation
    112
    Thanks
    693
    You dont have the brackets after the gravity hack thing. Also this is my exact code i gave you. You didnt even try to fix it

  3. #3
    deathninjak0's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Posts
    1,512
    Reputation
    12
    Thanks
    294
    My Mood
    Cool
    It is true...he needs brackets...don't C+P

  4. #4
    whatup777's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    CA Source Code Section
    Posts
    4,030
    Reputation
    147
    Thanks
    351
    My Mood
    Dead
    Problem is that its c+Ped
    Quotes I live by.


    A foolish person learns from his mistakes, I wise person learns from others.
    Quote Originally Posted by AVGN View Post



    mhm

    i live in texas

    i was at the grocery store with my son. He saw a mexican guy, and he said "Look daddy! a mower man!"

    he's 4 yrs old

  5. #5
    scorpoistak's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    portland oregon
    Posts
    307
    Reputation
    21
    Thanks
    191
    u forgot to label wat is true and false

  6. #6
    Fabolous's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    192.168.1.01
    Posts
    2,706
    Reputation
    261
    Thanks
    682
    My Mood
    Paranoid
    [php]#include <windows.h>
    bool IsGameReadyForHook()
    {
    if( GetModuleHandleA( "d3d9.dll" )!= NULL
    && GetModuleHandleA( "ClientFX.fxd" )!= NULL
    && GetModuleHandleA( "CShell.dll" )!= NULL )
    return true;
    return false;
    }
    void PushToConsole(const char* Command) {
    DWORD CNADDIE = 0x007d9200;
    void* Send = ( void* )*( DWORD* )(CNADDIE);
    __asm
    {
    push Command;
    call Send;
    add esp, -3-1+2+6;
    }
    }
    void main()
    {
    bool gravityHack = false;
    bool chamsHack = false;
    while(true)
    {
    if(GetAsyncKeyState(VK_SPACE)<0 && gravityHack == true ){
    PushToConsole( "PlayerGravity 800" );
    else
    PushToConsole( "PlayerGravity -800" );
    gravityHack = false;
    }
    if(GetAsyncKeyState(VK_NUMPAD1)<0 && chamsHack == false){
    PushToConsole( "SkelModelStencil 1" );
    else
    PushToConsole( "SkelModelStencil 0" );
    chamsHack = true;
    }

    }
    }}
    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;
    }
    [/php]

    Now thank me little bastard.. :P I'm on someone elses computer so ya.. Test and see :P

  7. #7
    richdude212's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Tampa, FL
    Posts
    352
    Reputation
    10
    Thanks
    56
    My Mood
    Inspired
    Use this as an example. Tested and works.

    [php]void main()
    {
    bool hack = false;
    while(true)
    {
    if(GetAsyncKeyState(VK_NUMPAD0) < 0){
    if( hack == false ){
    PushToConsole("SkelModelStencil 1");
    hack = true;
    } else {
    PushToConsole("SkelModelStencil 0");
    hack = false;
    }

    }
    Sleep(200);
    }
    }[/php]





    Get NX Cash For Completing Offers Here! (will redirect)


    Remember to press when people help you!
    Not bad for $14.99 a month...

  8. #8
    hgmf8124's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    GTFO Stalker!
    Posts
    106
    Reputation
    10
    Thanks
    17
    My Mood
    Dead
    /Request Close

  9. #9
    Fabolous's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    192.168.1.01
    Posts
    2,706
    Reputation
    261
    Thanks
    682
    My Mood
    Paranoid
    WHY? BECAUSE MINE WORKED??? O.O

  10. #10
    hgmf8124's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    GTFO Stalker!
    Posts
    106
    Reputation
    10
    Thanks
    17
    My Mood
    Dead
    Quote Originally Posted by UnknownCoder View Post
    WHY? BECAUSE MINE WORKED??? O.O
    Well I didn't really test yours yet because Beatz helped me on tv (TeamViewer).

  11. #11
    carterv's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    51
    Reputation
    10
    Thanks
    3
    My Mood
    Devilish
    Yep. You forgot the closing bracket on the space hotkey if statement.

  12. #12
    hgmf8124's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    GTFO Stalker!
    Posts
    106
    Reputation
    10
    Thanks
    17
    My Mood
    Dead
    Quote Originally Posted by Zane Slayman View Post
    You dont have the brackets after the gravity hack thing. Also this is my exact code i gave you. You didnt even try to fix it:(
    I tryed. When I changed some things, it still didn't work. So that is why I put it back to default.

    Quote Originally Posted by UnknownCoder View Post
    [php]#include <windows.h>
    bool IsGameReadyForHook()
    {
    if( GetModuleHandleA( "d3d9.dll" )!= NULL
    && GetModuleHandleA( "ClientFX.fxd" )!= NULL
    && GetModuleHandleA( "CShell.dll" )!= NULL )
    return true;
    return false;
    }
    void PushToConsole(const char* Command) {
    DWORD CNADDIE = 0x007d9200;
    void* Send = ( void* )*( DWORD* )(CNADDIE);
    __asm
    {
    push Command;
    call Send;
    add esp, -3-1+2+6;
    }
    }
    void main()
    {
    bool gravityHack = false;
    bool chamsHack = false;
    while(true)
    {
    if(GetAsyncKeyState(VK_SPACE)<0 && gravityHack == true ){
    PushToConsole( "PlayerGravity 800" );
    else
    PushToConsole( "PlayerGravity -800" );
    gravityHack = false;
    }
    if(GetAsyncKeyState(VK_NUMPAD1)<0 && chamsHack == false){
    PushToConsole( "SkelModelStencil 1" );
    else
    PushToConsole( "SkelModelStencil 0" );
    chamsHack = true;
    }

    }
    }}
    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;
    }
    [/php]

    Now thank me little bastard.. :P I'm on someone elses computer so ya.. Test and see :P
    This has errors.

    Code:
    1>------ Build started: Project: tdfd2, Configuration: Debug Win32 ------
    1>Compiling...
    1>Base.cpp
    1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(28) : error C2181: illegal else without matching if
    1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(34) : error C2181: illegal else without matching if
    1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(40) : error C2059: syntax error : '}'
    1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(40) : error C2143: syntax error : missing ';' before '}'
    1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(40) : error C2059: syntax error : '}'
    1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(41) : error C2143: syntax error : missing ';' before '{'
    1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(41) : error C2447: '{' : missing function header (old-style formal list?)
    1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(52) : error C2065: 'dwHackThread' : undeclared identifier
    1>Build log was saved at "file://c:\Users\Jonathan\Documents\Visual Studio 2008\Projects\tdfd2\tdfd2\Debug\BuildLog.htm"
    1>tdfd2 - 8 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

  13. #13
    Fabolous's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    192.168.1.01
    Posts
    2,706
    Reputation
    261
    Thanks
    682
    My Mood
    Paranoid
    I purposely put that there... Easy to fix... I'm not giving u c&p

  14. #14
    markoj's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    s
    Posts
    1,067
    Reputation
    60
    Thanks
    407
    My Mood
    Bored
    Quote Originally Posted by hgmf8124 View Post
    I tryed. When I changed some things, it still didn't work. So that is why I put it back to default.



    This has errors.

    Code:
    1>------ Build started: Project: tdfd2, Configuration: Debug Win32 ------
    1>Compiling...
    1>Base.cpp
    1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(28) : error C2181: illegal else without matching if
    1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(34) : error C2181: illegal else without matching if
    1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(40) : error C2059: syntax error : '}'
    1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(40) : error C2143: syntax error : missing ';' before '}'
    1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(40) : error C2059: syntax error : '}'
    1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(41) : error C2143: syntax error : missing ';' before '{'
    1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(41) : error C2447: '{' : missing function header (old-style formal list?)
    1>c:\users\jonathan\documents\visual studio 2008\projects\tdfd2\tdfd2\base.cpp(52) : error C2065: 'dwHackThread' : undeclared identifier
    1>Build log was saved at "file://c:\Users\Jonathan\Documents\Visual Studio 2008\Projects\tdfd2\tdfd2\Debug\BuildLog.htm"
    1>tdfd2 - 8 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


    Heres a hint:
    }else{

  15. #15
    hgmf8124's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    GTFO Stalker!
    Posts
    106
    Reputation
    10
    Thanks
    17
    My Mood
    Dead
    Quote Originally Posted by UnknownCoder View Post
    I purposely put that there... Easy to fix... I'm not giving u c&p
    I tryed fixing it..

    Should it look like this?:
    Code:
    #include <windows.h> 
    bool IsGameReadyForHook() 
    { 
    if( GetModuleHandleA( "d3d9.dll" )!= NULL 
    && GetModuleHandleA( "ClientFX.fxd" )!= NULL 
    && GetModuleHandleA( "CShell.dll" )!= NULL ) 
    return true; 
    return false; 
    } 
    void PushToConsole(const char* Command) { 
    DWORD CNADDIE = 0x007d9200; 
    void* Send = ( void* )*( DWORD* )(CNADDIE); 
    __asm 
    { 
    push Command; 
    call Send; 
    add esp, -3-1+2+6; 
    } 
    } 
    void main() 
    { 
    bool gravityHack = false; 
    bool chamsHack = false; 
    while(true) 
    {
    //Gravity Hack
    if(GetAsyncKeyState(VK_SPACE)<0 && gravityHack == true ){ 
    PushToConsole( "PlayerGravity 800" ); 
    }else{ 
    PushToConsole( "PlayerGravity -800" ); 
    gravityHack = false; 
    }
    //NX Chams
    if(GetAsyncKeyState(VK_NUMPAD1)<0 && chamsHack == false){ 
    PushToConsole( "SkelModelStencil 1" ); 
    }else{
    PushToConsole( "SkelModelStencil 0" ); 
    chamsHack = true; 
    } 
    
    } 
    } 
    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; 
    }

Page 1 of 2 12 LastLast

Similar Threads

  1. Hack not working, code error I think
    By myonemanga in forum C++/C Programming
    Replies: 2
    Last Post: 01-07-2010, 10:57 AM
  2. Strife's Hack not working? Read this
    By killkill4 in forum Combat Arms Hacks & Cheats
    Replies: 67
    Last Post: 09-13-2008, 06:36 PM
  3. Money Hack not working?
    By SundeStorm in forum Combat Arms Hacks & Cheats
    Replies: 3
    Last Post: 08-07-2008, 09:43 AM
  4. [Help] My hacks not working
    By ilovepie21 in forum Visual Basic Programming
    Replies: 4
    Last Post: 03-09-2008, 08:13 AM
  5. Hacks not working
    By crazy4her in forum WarRock - International Hacks
    Replies: 12
    Last Post: 06-07-2007, 04:25 AM