Results 1 to 5 of 5
  1. #1
    .DLL's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    165
    Reputation
    10
    Thanks
    14

    Question Bisma - How would I do this?

    Hello and I'm .DLL,
    At the moment Im a newbie at VB.NET and I had a thought one day while playing Combat Arms,
    "Me : Why not make a quick switcher in VB.NET..."

    Whats a quick switcher you might ask?
    It's basically , hmm can't explain that well.
    Well you know when your sniping and you click the letter 'Q' two times to re-duce the recoil or accuracy and such
    basically a quick switcher would allow you to set some options so when you shoot/click (LMB) about 0.02 seconds after you
    shoot it would activate the quick switcher allowing it to click 'Q' two times with-out you moving a figure.

    Well why cant you make such a simple program?
    As I stated above Im still a VB.NET newbie and I really don't want to work on the basic kind-of programs I want to move on
    to the 'Intermediate' level programs and leave the 'Beginner' level.

    Here is my code so far (I've been working on this for about 10minutes);
    Code:
    'Bisma - QuickSwitcher
    Public Class Form1
    
        Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
        '------------------------------------------------------
    
        'Other(s)
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Button2.Enabled = False
        End Sub
        Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            If GetAsyncKeyState(Keys.Q) Then
                SendKeys.Send("{Q}")
                SendKeys.Send("{Q}")
                Status.Text = "Quicking!"
            Else
                Status.Text = "Waiting for input..."
            End If
        End Sub
        '------------------------------------------------------
    
        'Buttons
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Timer1.Start()
            Button1.Enabled = False
            Button2.Enabled = True
            Status.Text = "[B]Quicking!"
        End Sub
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            Timer1.Stop()
            Button2.Enabled = False
            Button1.Enabled = True
            Status.Text = "[B]Waiting for input..."
        End Sub
        '------------------------------------------------------
    
        'Tool Strips
    
        Private Sub SupportsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SupportsToolStripMenuItem.Click
            MessageBox.Show("Combat Arms Only (MULTI SOON)")
        End Sub
        Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
            Application.Exit()
        End Sub
        '------------------------------------------------------
    But I'm having a problem in-game/out-of game when ever I actually run the program I get an error with this code,
    Code:
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            If GetAsyncKeyState(Keys.Q) Then
                SendKeys.Send("{Q}")
                SendKeys.Send("{Q}")
                Status.Text = "Quicking!"
            Else
                Status.Text = "Waiting for input..."
            End If
        End Sub
    Anyone mind helping? :/
    Last edited by .DLL; 06-22-2012 at 07:10 PM.

  2. #2
    kolec94's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Location
    Davenport,IA
    Posts
    1,784
    Reputation
    2
    Thanks
    104
    seem like it was over done cuz ur looking for a spammer with out the iniifite loop
    correct me if im wrong

    [IMG]https://i988.photobucke*****m/albums/af4/mallard247/kolec94.png[/IMG]

  3. #3
    Horror's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    51,4.
    Posts
    6,920
    Reputation
    574
    Thanks
    5,050
    My Mood
    Twisted
    Off : Why bother making it in VB ? Far more easier in AHK ... :P
    On : I dont quite understand this code, im pretty much a newb too :l
     

    Minion+ : February 2014 - January 2015
    Counter Strike: Global Offensive Minion : November 2014 - January 2015
    Alliance of Valiant Arms Minion : August 2014 - January 2015
    Need For Speed World Minion : January 2014 - January 2015
    Rust Minion : January 2014 - January 2015
    Call of Duty Minion : January 2013 - January 2015
    Editor : December 2012 - April 2013
    Donator : March 2014 - Current
    Member : October 2010 - Current

    Previously known as "Isaakske".

  4. #4
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Try changing

    Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer

    to

    Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Int32) As Int16



  5. #5
    wompzilla's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    2
    If I'm not mistaking, Sendkeys does not work on combat arms because it is a DirectX Game.
    You can use an alternative to sendkeys which can be found here:
    https://www.mpgh.net/forum/378-open-s...-code-sdk.html
    Thanks to NextGen1

  6. The Following User Says Thank You to wompzilla For This Useful Post:

    Hassan (06-26-2012)

Similar Threads

  1. How would people do this?
    By Dead 4 Real in forum Combat Arms Coding Help & Discussion
    Replies: 7
    Last Post: 01-22-2011, 02:37 PM
  2. How would i go about doing this
    By TJC20207 in forum Combat Arms Mod Discussion
    Replies: 1
    Last Post: 04-25-2010, 04:20 PM
  3. how would u fix this shit?
    By asdf12345678 in forum General
    Replies: 7
    Last Post: 12-09-2009, 05:34 PM
  4. How much would you buy this for
    By komakazee in forum Trade Accounts/Keys/Items
    Replies: 82
    Last Post: 12-02-2009, 07:23 PM
  5. HOW MUCH WOULD YOU BUY THIS ACCOUNT 4?
    By VIC116052 in forum Trade Accounts/Keys/Items
    Replies: 9
    Last Post: 12-01-2009, 03:54 PM