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);
}
}
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);
}
}
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
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
Originally Posted by bandi12
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
Originally Posted by DOOP
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?
Originally Posted by desertflame
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