Register for your free account! | Forgot your password?

Go Back   elitepvpers > Shooter > WarRock
You last visited: Today at 17:01

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



GetAsyncKeyState

Discussion on GetAsyncKeyState within the WarRock forum part of the Shooter category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2013
Posts: 27
Received Thanks: 2
GetAsyncKeyState

Hello Guys,

Code:
if (GetAsyncKeyState(VK_SHIFT) &1)
only works if you hold down the shift button. But is there anyway to make it so that if you press it once then it stays on. And if you press it again it goes off. Instead of holding down the shift key?

would this work:

Code:
if (GetAsyncKeyState(VK_SHIFT) &1)

		{
			*(float*)(*inGame + ADR_OFS_NORECOIL1) = 1;
			*(float*)(*inGame + ADR_OFS_NORECOIL2) = 1;
			*(float*)(*inGame + ADR_OFS_NORECOIL3) = 1;
		}
		else
		{
			*(float*)(*inGame + ADR_OFS_NORECOIL1) = 0;
			*(float*)(*inGame + ADR_OFS_NORECOIL2) = 0;
			*(float*)(*inGame + ADR_OFS_NORECOIL3) = 0;
		}
winkabean is offline  
Old 04/27/2013, 13:34   #2
 
elite*gold: 78
Join Date: Jul 2011
Posts: 457
Received Thanks: 887
Code:
bool temp = false;

if (GetAsyncKeyState(VK_SHIFT) &1)
{
	temp = (temp ? false : true);

	if (temp)
	{
		*(float*)(*inGame + ADR_OFS_NORECOIL1) = 1;
		*(float*)(*inGame + ADR_OFS_NORECOIL2) = 1;
		*(float*)(*inGame + ADR_OFS_NORECOIL3) = 1;
	}
	else
	{
		*(float*)(*inGame + ADR_OFS_NORECOIL1) = 0;
		*(float*)(*inGame + ADR_OFS_NORECOIL2) = 0;
		*(float*)(*inGame + ADR_OFS_NORECOIL3) = 0;
	}
}
MadnessFreak is offline  
Old 04/27/2013, 15:01   #3
 
elite*gold: 0
Join Date: Mar 2013
Posts: 85
Received Thanks: 33
Warum das Async & 1
einfach rauslassen, dann musste es auch nur einmal drücken ^^
btw. No Recoil = Recoil -> 0
also hast du es immer an, ausser wenn du shift drückst
5ubZer0 is offline  
Reply


Similar Threads Similar Threads
Omg? Brauche Hilfe mit GetAsyncKeyState ..
12/27/2011 - .NET Languages - 2 Replies
http://mariodev.de/uploader/bild.php/1683,vbhelp7W R4Y.png Wo liegt das Problem? Habe das vorher noch nie gehabt ... Neuer Bug vielleicht? Bitte helft mir ! Mit freundlichen Grüßen
VB.net Frage zu "user32" und "GetAsyncKeystate"
11/27/2010 - .NET Languages - 11 Replies
Hi Community, ich habe einen Spamer gebstelt und wollte ihn mit Hotkeys verschönern, doch ich bekomm nun beim Debuggen einen Fehler. Hier der Code: Public Class Form1 Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Timer1.Interval = TextBox2.Text My.Computer.Keyboard.SendKeys(TextBox1.Text) My.Computer.Keyboard.SendKeys("{Enter}") End Sub



All times are GMT +1. The time now is 17:01.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.