Please some one advice to me if i need the code from c++ for check keyboard button presses, For the concept when player press "Enter" key three time per five sec then exit process.
Please make example code for me thank you for advice.
You should just use a low level keyboard hook. I'm not going to post any code for sake of nubcakes making keyloggers from it. Look more into SetWindowsHookEx() using WH_KEYBOARD_LL.
// How long should we allow for the 3 presses?
double timeSpan = 5.0; // let's go with 5 seconds for this example as you asked
int counter = 0; // used to count number of times Enter is pressed
// VARIABLES FOR TIMING
LARGE_INTEGER frequency;
LARGE_INTEGER startTime, currentTime;
double elapsedTime = 0;
QueryPerformanceFrequency(&frequency);
QueryPerformanceCounter(&startTime);
// CHECK for KEY PRESS
if(GetAsyncKeyState(VK_RETURN))
{
// Calculate the time from last press
QueryPerformanceCounter(¤tTime);
elapsedTime = (currentTime.QuadPart - startTime.QuadPart) * 1000.0 / frequency.QuadPart;
// If we are within the set time
if(elapsedTime < timeSpan)
{
counter++;
}
else
{
// Set a new start time
QueryPerformanceCounter(&startTime);
counter = 1;
}
//Are we at 3 or more clicks of enter?
if(counter >= 3)
{
exit(-1); // exit the game
}
}
[GAMESCOM-SHOP] Vindictus Code, FireFall BETA Code, McGame.com Code, Victory Ukash 10/18/2012 - elite*gold Trading - 8 Replies Hallo Leute hab ein paar Sachen auf der Gamescom gesammelt und übrig, diese möchte ich hier verkaufen.
Ich akzeptiere nur Paypal, E*gold und Paysafecards!
Hier ist eine Liste mit Bildern (natürlich sind die Codes zensiert :D):
1. Firefall Beta KEY Ihr macht den Preis!
Bild
2. Vindictus Code 50 e*gold
Bild
used king Rammus code OR katarina kitty cat code (KR) → used PAX sivir code (NA / EU) 08/23/2012 - League of Legends Trading - 2 Replies Hello Korea is my server users.
I NA / EU servers have already been used in the "Pax Sivir Code" wants
As a reward, "king Rammus code OR Katarina kitty cat code"
I will send you to gift.
Have already used the code,
Feel free to do the exchange!
Please send mail
[email protected]
used king Rammus code OR katarina kitty cat code (KR) → used PAX sivir code (NA / EU) 08/20/2012 - League of Legends Trading - 0 Replies Hello Korea is my server users.
I NA / EU servers have already been used in the "Pax Sivir Code" wants
As a reward, "king Rammus code OR Katarina kitty cat code"
I will send you to gift.
Have already used the code,
Feel free to do the exchange!
Please send mail
[email protected]