Hotkey help :(

Posts 1–15 of 18 · Page 1 of 2
Hotkey help :(
Hey. I never really used hotkeys because it was pretty useless to me but now im kinda trying new things. It really isn't new to me but for some reason, nothing happens when i press it ingame.

Here the code:
Code:
      

#include "stdafx.h"  //idk why i bothered putting this, im sure y'all would know anyway

// rec is false btw. so i didnt bother declaring it in here



                 while(true)
		{

		if(GetAsyncKeyState(VK_NUMPAD0)<0)
		{rec =! rec; Beep(500,500);}
		if(rec==true)
		{
			
			memcpy((VOID*)0x6D2894, "\x00\x00\x00\x00\x00\x00", 6);

		
		}
	    
		
		if(rec==false)
	       {  
	
			
			memcpy((VOID*)0x6D2894, "\x01\x01\x01\x01\x01\x01", 6);
	    
		}
		}
credits: @giniyat101 for wallhack source
Quote Originally Posted by desertflame View Post
Hey. I never really used hotkeys because it was pretty useless to me but now im kinda trying new things. It really isn't new to me but for some reason, nothing happens when i press it ingame.

Here the code:
Code:
      

#include "stdafx.h"  //idk why i bothered putting this, im sure y'all would know anyway

// rec is false btw. so i didnt bother declaring it in here



                 while(true)
		{

		if(GetAsyncKeyState(VK_NUMPAD0)<0)
		{rec =! rec; Beep(500,500);}
		if(rec==true)
		{
			
			memcpy((VOID*)0x6D2894, "\x00\x00\x00\x00\x00\x00", 6);

		
		}
	    
		
		if(rec==false)
	       {  
	
			
			memcpy((VOID*)0x6D2894, "\x01\x01\x01\x01\x01\x01", 6);
	    
		}
		}
credits: @giniyat101 for wallhack source

Have u tried putting else n there?
Quote Originally Posted by JusCaus View Post
Have u tried putting else n there?
The if statement with getasynckeystate is only changing the boolean state of rec when the key is pressed right? So where should i put else?
All That does is this:
rec=!rec; and Beep(500,500);
A bit confused as to where the else should go.
Thanks for the reply.
Yes to make it an On and off hotkey you would have to include else after the first part so if its pressed again it will turn off
make it &1 not <0

Code:
if(GetAsyncKeyState(VK_NUMPAD0)&1) {rec = !rec ; Beep(500,500);}
good luck
Quote Originally Posted by Dragon(H)ell View Post
make it &1 not <0

Code:
if(GetAsyncKeyState(VK_NUMPAD0)&1) {rec = !rec ; Beep(500,500);}
good luck
Tried before i posted here T_T
Quote Originally Posted by desertflame View Post
Tried before i posted here T_T

I'll post the code when I get on the pc
Quote Originally Posted by desertflame View Post
Tried before i posted here T_T
So the problem in your base,xtrap killing your thread

edit:BTW are you using HideModule?
Quote Originally Posted by Dragon(H)ell View Post
So the problem in your base,xtrap killing your thread

edit:BTW are you using HideModule?
Nope. No, all my other hacks are working in the same thread. Thanks tho
try this
Code:
if(GetAsyncKeyState(VK_NUMPAD0)&1)
{
wall = !wall;
}
if(wall)
{
memcpy((VOID*)0x6D2894, "\x00\x00\x00\x00\x00\x00", 6);
}
else
{
memcpy((VOID*)0x6D2894, "\x01\x01\x01\x01\x01\x01", 6);
}
Quote Originally Posted by DOOP View Post
try this
Code:
if(GetAsyncKeyState(VK_NUMPAD0)&1)
{
wall = !wall;
}
if(wall)
{
memcpy((VOID*)0x6D2894, "\x00\x00\x00\x00\x00\x00", 6);
}
else
{
memcpy((VOID*)0x6D2894, "\x01\x01\x01\x01\x01\x01", 6);
}
IDK for me whit &1 was never working i am using <0 it's work perfect when the key is not persed the value is + when you press it the value is something like -9000...
@desertflame when i added first time hotkey's i have some problem like this my problem was that Xcrap after 10-15 s killed my loop maybe is killing you'r sto
Quote Originally Posted by bandi12 View Post
IDK for me whit &1 was never working i am using <0 it's work perfect when the key is not persed the value is + when you press it the value is something like -9000...
if you use "&1" and you press hotkey. the feature turn ON and OFF smoothly
If you are not using sleep in HACKTHREAD
if you use the sleep you need to hold alt + hotkey
Quote Originally Posted by DOOP View Post

if you use "&1" and you press hotkey. the feature turn ON and OFF smoothly
If you are not using sleep in HACKTHREAD
if you use the sleep you need to hold alt + hotkey
So <0 works smoothly if im using sleep then?
Quote Originally Posted by desertflame View Post
So <0 works smoothly if im using sleep then?
yah add a sleep(100) and it;s fine i am usign it and i don't have any problem
try :
Code:
bool wall = false;
if(GetAsyncKeyState(VK_Hotkey)) { hack = !hack; }
if(wall)
{
memcpy((VOID*)0x6D2894, "\x00\x00\x00\x00\x00\x00", 6);//on
}
else
{
memcpy((VOID*)0x6D2894, "\x01\x01\x01\x01\x01\x01", 6);//off
}
Posts 1–15 of 18 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?