ExclamationHotkeys {PLEASE HELP}

Posts 111 of 11 · Page 1 of 1
Hotkeys {PLEASE HELP}
im having some trouble with my hotkeys, heres the code-
Code:
#include <windows.h>
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll"     ) != NULL 
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL 
&& GetModuleHandleA( "CShell.dll"   ) != NULL )
return true;
return false;
}
void ConsolePush(const char* Command) {
DWORD CNADDIE = 0x007d9200;
void* Send = ( void* )*( DWORD* )(CNADDIE);
__asm
{
push Command;
call Send; 
add esp, -3-1+2+6;
}
}
void main()
{
	while(true)
{
	//NOT POSTING P***
             //I have to use ConsolePush instead of PushToConsole tho lol
}
		bool hack = false;
while(true)
{
if(GetAsyncKeyState(VK_NUMPAD0) < 0){
	hack = !hack;
	if(hack){
	ConsolePush("ShowFirePath 1");
	} else {
	ConsolePush("ShowFirePath 0");
	}
}
}
}
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;
}
then when i go ingame the the hotkey doesnt work

PM me or post here if u have a fix to this *Creditz and thanks*
< 0 to &1
I'm fairly certain I know what you're talking about.
Wait, was that the full source?
im posting full source now...

EDIT: Done
Oh I didn't need that.. I just thought (If you thought that was the full source, WHAT THE FUCK)
so whats not working with it>?
i know the problem i think. Replace this with yours(You spelled Consolepush you needed PushToConsole) asl so you needed to add a sleep statement. if this is wrong sorry this is my first day of making a hakc! lol

if(GetAsyncKeyState(VK_NUMPAD0) < 0){
hack = !hack;
if(hack){
PushToConsole("ShowFirePath 1");
} else {
PushToConsole("ShowFirePath 0");
}
Sleep(200);
}
}
}
Quote Originally Posted by NOOBJr View Post
i know the problem i think. Replace this with yours(You spelled Consolepush you needed PushToConsole) asl so you needed to add a sleep statement. if this is wrong sorry this is my first day of making a hakc! lol

if(GetAsyncKeyState(VK_NUMPAD0) < 0){
hack = !hack;
if(hack){
PushToConsole("ShowFirePath 1");
} else {
PushToConsole("ShowFirePath 0");
}
Sleep(200);
}
}
}
he is not complaining about the lag
he is saying that it is not working
umm i think you need to remove one } from the last three
You fucked up the true&false on bool hack. You made it so bool hack always reverts to false when you press numpad0.

Different, less confusing method below.

Code:
if(GetAsyncKeyState(VK_NUMPAD0) < 0){
	if( hack = false ){
	ConsolePush("ShowFirePath 1");
        hack = true;
	} else {
	ConsolePush("ShowFirePath 0");
        hack = false;
	}
}
Quote Originally Posted by Disturbed View Post
You fucked up the true&false on bool hack. You made it so bool hack always reverts to false when you press numpad0.

Different, less confusing method below.

Code:
if(GetAsyncKeyState(VK_NUMPAD0) < 0){
	if( hack = false ){
	ConsolePush("ShowFirePath 1");
        hack = true;
	} else {
	ConsolePush("ShowFirePath 0");
        hack = false;
	}
}
==

He could just switch the 0 and 1.
Quote Originally Posted by Crash View Post
==

He could just switch the 0 and 1.
Or he could replace it with system("shutdown [/f] [/c "You fucking failed"]");


....And no, he couldn't. There are 2 problems. The first being what you stated, and that he needs to remove hack = !hack; . Both of which are corrected in what I spoon fed previously.
Posts 111 of 11 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?