Tieentjeee Posted March 23, 2016 Share Posted March 23, 2016 (edited) When I have this if (e.KeyCode == Keys.NumPad0) { InfLoop = false; } It works fine. However if (e.KeyCode == Keys.Space) { // do something }//OR if (e.KeyCode == Keys.V) { // Do something } doesnt. Can anybody help me w/ this? Edited March 23, 2016 by Tieentjeee Link to comment Share on other sites More sharing options...
frodzet Posted March 24, 2016 Share Posted March 24, 2016 When I have this if (e.KeyCode == Keys.NumPad0) { InfLoop = false; } It works fine. However if (e.KeyCode == Keys.Space) { // do something }//OR if (e.KeyCode == Keys.V) { // Do something } doesnt. Can anybody help me w/ this? Try registering a Game KeyPress instead: if(Game.IsKeyPressed(Keys.Space)) { // Do something. } use it in your Tick. Link to comment Share on other sites More sharing options...
Tieentjeee Posted March 24, 2016 Author Share Posted March 24, 2016 Thanks for your reply! This did not solve my problem though. I think there are some bugs in my script (I'm really inexperienced) so I've just thrown it away and redone it & now it works fine. Link to comment Share on other sites More sharing options...
frodzet Posted March 24, 2016 Share Posted March 24, 2016 Thanks for your reply! This did not solve my problem though. I think there are some bugs in my script (I'm really inexperienced) so I've just thrown it away and redone it & now it works fine. Feel free to add my skype: sifferjb, should you have more questions. Link to comment Share on other sites More sharing options...
Azorah Posted March 27, 2016 Share Posted March 27, 2016 (edited) Hi, this is happening because your controls are set to do something already (I think). V is to change from first person/third person and space is to jump. Here is basic code I used to make a trainer I created open: private void OnKeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F9) { this.StartUpMenu(); } } I recommend using the L key if you want to use a key on the keyboard, as it does nothing in the game for everyone (unless they set it to). Here's a list of keys I would recommend using: - L - All the F keys (F1, F2 etc.) EXCEPT F4 as native trainer and many other trainers people use, have that key. - NumPad7 - NumPad9 - NumPad3 - NumPad1 (Only those Numpads as the others get used to scroll and select.) Feel free to add me on skype or steam for anything else, here are my links: Skype: Isthisreallyjacob Steam: http://steamcommunity.com/id/JacobCTV/ Website: http://bit.ly/1RtXme2 GoodLuck! When I have this if (e.KeyCode == Keys.NumPad0) { InfLoop = false; } It works fine. However if (e.KeyCode == Keys.Space) { // do something }//OR if (e.KeyCode == Keys.V) { // Do something } doesnt. Can anybody help me w/ this? Edited March 27, 2016 by Azorah 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