TGSlp Posted August 2, 2014 Author Share Posted August 2, 2014 Hey.I want to change the actionkey (Default CTRL) in the code to space. But i cant find it in vb6.Where in the code can i change it? I searched for Actionkey, CTRL, Control and so on..Hope someone could help me :)Regards, Rene Link to comment Share on other sites More sharing options...
Rob Janes Posted August 2, 2014 Share Posted August 2, 2014 In your client, go into modInputs, and find Sub CheckKeysYou'll see it'll say If GetAsyncKeyState(VK_CONTROL) >= 0 Then ControlDown = False.There are 2 ways to resolve this issue, you can 1\. Change the value of VK_CONTROL itself or 2\. Replace it with VK_SPACE and then we'll define what VK_SPACE is. That being said. I'll give you the code for both.Method 1\. (Changing VK_CONTROL's value to the spacebar)>! Go into modConstants, find Public Const VK_CONTROL As Long = &H11 and replace it with Public Const VK_CONTROL as long = &H20 Method 2\. (Changing GetAsyncKeyState to VK_SPACE)>! In modConstants, find where it declares all the other keys, like VK_CONTROL, VK_RETURN etc, and add in>! ```Public Const VK_SPACE = &H20>! ```>! Go into modInputs, Sub CheckKeys, change VK_CONTROL at the top to VK_SPACE Link to comment Share on other sites More sharing options...
TGSlp Posted August 4, 2014 Author Share Posted August 4, 2014 Thanks Rob, i changed it, but it´s still CTRL, and i changed Public Const VK_CONTROL As Long = &H11.I will try it again, but thank you :)Best regards, TGSlp Link to comment Share on other sites More sharing options...
Rob Janes Posted August 6, 2014 Share Posted August 6, 2014 Replace with &H11 with &H20 Link to comment Share on other sites More sharing options...
iLeGiTiMx Posted September 4, 2015 Share Posted September 4, 2015 Have the same issue.. Changed Control to H20 and added a new Key:Public Const VK_CONTROL As Long = &H20Public Const VK_SPACE = &H20But ingame i still activate things with CTRL :huh: Link to comment Share on other sites More sharing options...
Sealbreaker Posted September 5, 2015 Share Posted September 5, 2015 I believe that if you use the method of creating the new constant (Public Const VK_SPACE = &H20) you'd have to change the section where it uses that constant (getAsyncKeyState(CONSTANTHERE)) to use VK_SPACE instead of VK_CONTROL aswell. Also, shouldn't VK_SPACE be declared as a long as well if it's the same type of constant?Correct me if I'm wrong.-Seal Link to comment Share on other sites More sharing options...
sherwin Posted September 6, 2015 Share Posted September 6, 2015 What's different between using GetKeyState and GetAsyncKeyState ?I always use GetKeyState because it's easy to use.. you don't have to set the variable of the key and just input it as vbKeyControl likeIf GetKeyState(vbKeyControl) < 0 then CtrlDown = truevbKeyControl is on the syntax itself, you don't have to add a constant for it.Question: What's the difference between them? Speed? Link to comment Share on other sites More sharing options...
Growlith1223 Posted September 6, 2015 Share Posted September 6, 2015 Async being in the name, I would assume it doesn't lock the thread up for a determined amount of time. so in theory, yes, speed is the difference here Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now