Thread: Need some help

Results 1 to 9 of 9
  1. #1
    kvdirect's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Posts
    24
    Reputation
    10
    Thanks
    2

    Need some help

    Ok I have been trying to code a hot key hack but i am having a problem. Only the first key is working. I can code everything to 1 button but that is getting hard because I have added alot to the hack. I will paste some of my code if needed. I would like just a simple example of coding 2 buttons with 2 different hacks. I know how to turn off and on the hacks its just when I try to use another key it doesn't work. The first hack turns on but when I press the 2nd key there is nothing.


    void main()
    {
    while(true)

    if(GetAsyncKeyState(VK_NUMPAD6) &1){;
    nxbrite = !nxbrite;
    if(nxbrite){
    PushToConsole("FullBright 1" );
    nxbrite = true;
    } else {
    PushToConsole("FullBright 0" );
    nxbrite = false;
    }
    }
    if(GetAsyncKeyState(VK_NUMPAD9) &1){;
    nxfps = !nxfps;
    if(nxfps){
    //FPS
    PushToConsole("ShowFps 1");
    nxfps = true;
    } else {
    PushToConsole("ShowFps 0");
    nxfps = false;
    }
    }
    }
    DWORD WINAPI dwHackThread(LPVOID)
    {
    while( !IsGameReadyForHook() )

    main();

    Sleep(100);

    return 0;
    }

    Any help would be appreciated.

  2. #2
    CodeDemon's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    vagina
    Posts
    1,070
    Reputation
    50
    Thanks
    940
    My Mood
    Fine
    You dont have a { after your while true statement ^^ and the closing } of your while true statement(before you close the void).

    Also, you are doing exactly what this thread https://www.mpgh.net/forum/207-combat...toconsole.html says not to do(Unrelated to your error)

  3. #3
    LightzOut's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Posts
    185
    Reputation
    11
    Thanks
    25
    Code:
    if(GetAsyncKeyState(VK_NUMPAD6) &1){;
    If you don't know whats wrong with that line of code, go here: C++ Language Tutorial

    I even underlined it for you.

    Your also missing the opening bracket for the infinate loop.
    Last edited by LightzOut; 09-02-2010 at 10:34 AM.

  4. #4
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    5,052
    My Mood
    Cool
    This code is completely fixed. I fix all the problems i saw and made it 100% copy and paste-able. I am not perfect i need some of u guys to help me with problems that i did'nt see.


    Code:
    void main()
    {
    	while(true){
    
    		if(GetAsyncKeyState(VK_NUMPAD6) &1){
    			nxbrite = !nxbrite;
    			if(nxbrite){
    				PushToConsole("FullBright 1" );
    				nxbrite = true;
    			} else {
    				PushToConsole("FullBright 0" );
    				nxbrite = false;
    			}
    		}
    		if(GetAsyncKeyState(VK_NUMPAD9) &1){
    			nxfps = !nxfps;
    			if(nxfps){
    				//FPS
    				PushToConsole("ShowFps 1");
    				nxfps = true;
    			} else {
    				PushToConsole("ShowFps 0");
    				nxfps = false;
    			}
    		}
    		Sleep(100);
    	}
    }
    
    DWORD WINAPI dwHackThread(LPVOID)
    {
    	while( !IsGameReadyForHook() )
    		Sleep(100);
    
    	main();
    
    
    	return 0;
    }


    You still the dllmain so if u inject this it will be useless
    Last edited by topblast; 09-02-2010 at 01:01 PM.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  5. #5
    CoderNever's Avatar
    Join Date
    Feb 2009
    Gender
    female
    Location
    https://mpgh.net MPGHCash: $700,458,011
    Posts
    1,198
    Reputation
    131
    Thanks
    2,236
    My Mood
    Buzzed
    Quote Originally Posted by LightzOut View Post
    Code:
    if(GetAsyncKeyState(VK_NUMPAD6) &1){;
    If you don't know whats wrong with that line of code, go here: C++ Language Tutorial

    I even underlined it for you.

    Your also missing the opening bracket for the infinate loop.
    Lol, Yea I'm sure knowing C++ will also automatically teach you the guidelines for hacking. Also no outside links.

  6. #6
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,159
    Reputation
    490
    Thanks
    2,253
    Quote Originally Posted by CoderNever View Post
    Lol, Yea I'm sure knowing C++ will also automatically teach you the guidelines for hacking. Also no outside links.
    Learn C++ Does Teach How To Code For Ca../

  7. #7
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    5,052
    My Mood
    Cool
    Quote Originally Posted by whit View Post


    Learn C++ Does Teach How To Code For Ca../
    OFF TOPIC U ALL READY HAVE 602 THANKS
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  8. #8
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,159
    Reputation
    490
    Thanks
    2,253
    Quote Originally Posted by topblast View Post


    OFF TOPIC U ALL READY HAVE 602 THANKS
    Thanks For Ya Compliments...

  9. #9
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    5,052
    My Mood
    Cool
    Quote Originally Posted by whit View Post


    Thanks For Ya Compliments...
    bitches dont have a A
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

Similar Threads

  1. [Help Request] Need some help with my server premisions
    By pero122 in forum Minecraft Help
    Replies: 5
    Last Post: 11-07-2011, 10:55 PM
  2. [Help Request] Need some help to make a bot
    By Domo in forum Vindictus Help
    Replies: 6
    Last Post: 05-21-2011, 10:15 AM
  3. [Help Request] I need some help with binding eps7
    By v1zhaixingv1 in forum Vindictus Help
    Replies: 3
    Last Post: 05-18-2011, 09:25 PM
  4. need some help with client exe.
    By barney in forum Hack Requests
    Replies: 2
    Last Post: 11-03-2006, 10:05 PM
  5. my sig is done but i need some help
    By A7X Oblivian in forum Help & Requests
    Replies: 0
    Last Post: 02-21-2006, 12:24 AM