Results 1 to 7 of 7
  1. #1
    meeeeeeeeee's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    113
    Reputation
    13
    Thanks
    37

    [SOLVED]What's wring with this?

    Hey all,

    As you might or might not know i have made a trainer. Yeah there's 100s of them

    Anyway,
    If MW2 isn't running and you use the hack it completly stops.

    So can someone explain the isprocessopen thing,
    Heres what I used but it didn't work (btw this is VB)
    [php]
    if isProcessOpen ("iw4mp.exe")then
    My code here
    }else{
    msgbox ("Modern Warfare 2 isn't running")
    end if[/php]

    If this is wrong please tell me what's the right code.

    Thanks
    Last edited by meeeeeeeeee; 08-29-2010 at 08:12 AM.

  2. #2
    Mister Krister's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    in your room!
    Posts
    1,213
    Reputation
    31
    Thanks
    290
    My Mood
    Tired
    well simply enough u do have to have mw2 up to use any traininers so no worries

  3. The Following User Says Thank You to Mister Krister For This Useful Post:

    ir0ckyou (09-15-2010)

  4. #3
    meeeeeeeeee's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    113
    Reputation
    13
    Thanks
    37
    Quote Originally Posted by geje2002 View Post
    well simply enough u do have to have mw2 up to use any traininers so no worries
    No thats not what I mean, I want it to check if MW2 is running and if not show a message.

  5. #4
    rathynia's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Modern Warfare 2 Section.
    Posts
    457
    Reputation
    126
    Thanks
    538
    My Mood
    Aggressive
    Doesn't the IF command need to have brackets?

    try this?
    Code:
    if isProcessOpen ("iw4mp.exe")
    {
    //your code.
    }
    else
    { 
         msgbox ("Modern Warfare 2 isn't running") 
    end if  
    }
    Nothing Is "Impossible" For The Word Itself Says "I'm Possible".
    If you get a thank from me you better act like it's a reward, because I don't give them out easily.

    Computer Specs:
    Processor - AMD Athlon(tm) II X4 640 Processor 3.0 GHz (Not OverClocked)
    RAM - 8.0 GB
    OS - Microsoft Windows 7 Ultimate Edition 64-bit
    Video Card - GeForce GTX 550 Ti
    Video RAM 4.0 GB
    Pixel Shader version 5.0
    Vertex Shader version 5.0
    Sound Card - NVIDIA High Definition Audio
    Disk space - 1,640 GB

  6. #5
    Mister Krister's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    in your room!
    Posts
    1,213
    Reputation
    31
    Thanks
    290
    My Mood
    Tired
    ohh, sorry for misunderstanding

  7. The Following User Says Thank You to Mister Krister For This Useful Post:

    ir0ckyou (09-15-2010)

  8. #6
    meeeeeeeeee's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    113
    Reputation
    13
    Thanks
    37
    Quote Originally Posted by rathynia View Post
    Doesn't the IF command need to have brackets?

    try this?
    Code:
    if isProcessOpen ("iw4mp.exe")
    {
    //your code.
    }
    else
    { 
         msgbox ("Modern Warfare 2 isn't running") 
    end if  
    }
    That accually might be the problem
    I come from a background of java so I didn't think of that.
    Eventho java has that.

    Edit: Ow wait I think this is C++ and I'm coding VB

  9. #7
    House's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    2,990
    Reputation
    223
    Thanks
    9,296
    My Mood
    Cynical
    here you go

    Code:
    Public Class Form1
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            If IsProcessOpen("iw4mp") Then
                MsgBox("Modern Warfare 2 process found")
            Else
                MsgBox("Modern Warfare 2 process not found")
            End If
    
    
        End Sub
        Public Function IsProcessOpen(ByVal name As String) As Boolean
    
            For Each clsProcess As Process In Process.GetProcesses
    
                If clsProcess.ProcessName.Contains(name) Then
    
    
                    Return True
    
                End If
            Next
        End Function
    End Class
    /Marked as Solved
    Last edited by House; 08-29-2010 at 12:24 PM.

Similar Threads

  1. What is up with this thread?
    By chaosmast93 in forum Islam vs Western World
    Replies: 8
    Last Post: 05-08-2010, 06:43 PM
  2. What is wrong with this code?
    By t7ancients in forum C++/C Programming
    Replies: 10
    Last Post: 10-19-2009, 01:58 PM
  3. What's wrong with this?
    By yup in forum Visual Basic Programming
    Replies: 4
    Last Post: 03-18-2008, 10:36 AM
  4. what is wrong with this ??
    By floris12345! in forum Visual Basic Programming
    Replies: 5
    Last Post: 01-16-2008, 05:22 PM
  5. what is wrong with this source?
    By Petros in forum C++/C Programming
    Replies: 6
    Last Post: 07-04-2007, 04:33 PM