keybd_event CSGO

Posts 1–4 of 4 · Page 1 of 1
keybd_event CSGO
Ok I am still new to C++, I have tried googlieng but I can't really find it because there is no real good way of stating the question. Anyways, lets say you have a program (like a bhop script) where if you hold spacebar it spams it, but only whenever you are not pressing any other keys. I can't find out a way to let me press other keys (like A-D to strafe) while spamming the spacebar with the keybd_event hack. If someone could help me that would be appreciated!

Also this is basically the code I am talking about where CS:GO / your computer doesn't recognize any other keys being pressed while holding spacebar



#include <iostream>
#include <windows.h>
#include <conio.h>
#include <stdlib.h>
#include <stdio.h>

int main()
{
while (1)
{
if (GetAsyncKeyState(VK_SPACE) & 0x8000)
{

keybd_event(VK_SPACE, 0x39, NULL, NULL);

Sleep(3);

keybd_event(VK_SPACE, 0x39, KEYEVENTF_KEYUP, NULL);

Sleep(3);
}
}
}
Quote Originally Posted by NightNinja654 View Post
Ok I am still new to C++, I have tried googlieng but I can't really find it because there is no real good way of stating the question. Anyways, lets say you have a program (like a bhop script) where if you hold spacebar it spams it, but only whenever you are not pressing any other keys. I can't find out a way to let me press other keys (like A-D to strafe) while spamming the spacebar with the keybd_event hack. If someone could help me that would be appreciated!

Also this is basically the code I am talking about where CS:GO / your computer doesn't recognize any other keys being pressed while holding spacebar



#include <iostream>
#include <windows.h>
#include <conio.h>
#include <stdlib.h>
#include <stdio.h>

int main()
{
while (1)
{
if (GetAsyncKeyState(VK_SPACE) & 0x8000)
{

keybd_event(VK_SPACE, 0x39, NULL, NULL);

Sleep(3);

keybd_event(VK_SPACE, 0x39, KEYEVENTF_KEYUP, NULL);

Sleep(3);
}
}
}
If you dont wanna read and write anything in memory, you have to go ingame and set another key for +jumo
Like
bind f6 +jump

Then at your code change the keybd_event to f6 key
Else it will not work

And also this "script" is kinda useless since you have the c++, and tons of memory sources, its just read and write, it will be easier and better,
Your code like this will be the same as a AHK script...

Also next time use search...
Seems fixed @Smoke
just write memory dude it's not hard
Seems this has been solved as user has come online and has not bumped/updated thread.


/Closed
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Need help?