Results 1 to 8 of 8
  1. #1
    bohnenbong's Avatar
    Join Date
    Oct 2007
    Gender
    male
    Location
    On the toilette^^
    Posts
    222
    Reputation
    10
    Thanks
    47

    Whats wrong with this code ?

    Ok I want to build hacks ,too.
    I read the tuts and try something,
    at first only with stamina
    So now this problem...
    Private Sub Timer1_Timer()
    Call WriteALong("WarRock", 008B9B04, 1120403456)
    End Sub
    Thats red and VB6 wont want to make a exe there come a sign with the text...

    Hmmm than i try this....
    Private Sub Timer1_Timer()
    Call WriteALong("WarRock", &H8B9B04, 1120403456)
    End Sub
    Now i can make a exe but the hack doesnt work... There is a mistake...
    Thx for help

  2. #2
    ZeaS's Avatar
    Join Date
    Feb 2007
    Posts
    738
    Reputation
    15
    Thanks
    265
    the secound it`s right, maby wrong adress?

  3. #3
    str1k3r21's Avatar
    Join Date
    Mar 2007
    Posts
    166
    Reputation
    11
    Thanks
    51
    Quote Originally Posted by bohnenbong View Post
    Ok I want to build hacks ,too.
    I read the tuts and try something,
    at first only with stamina
    So now this problem...

    Thats red and VB6 wont want to make a exe there come a sign with the text...

    Hmmm than i try this....

    Now i can make a exe but the hack doesnt work... There is a mistake...
    Thx for help
    Well depends wat you write in your button and if ur address is working.

  4. #4
    Threadstarter
    Advanced Member
    bohnenbong's Avatar
    Join Date
    Oct 2007
    Gender
    male
    Location
    On the toilette^^
    Posts
    222
    Reputation
    10
    Thanks
    47
    Timer1.Interval = 1
    Timer1.Interval = 0

  5. #5
    str1k3r21's Avatar
    Join Date
    Mar 2007
    Posts
    166
    Reputation
    11
    Thanks
    51
    Quote Originally Posted by bohnenbong View Post
    Timer1.Interval = 1
    Timer1.Interval = 0
    And that is Stamina adress? If so tell me adress see if u got right one.

  6. #6
    Threadstarter
    Advanced Member
    bohnenbong's Avatar
    Join Date
    Oct 2007
    Gender
    male
    Location
    On the toilette^^
    Posts
    222
    Reputation
    10
    Thanks
    47
    i have this 2 buttons in the first i copy from tut ,
    Timer1.Interval = 1
    in the second
    Timer1.Interval = 0
    -------------------
    In the Form comes this code ...
    Public Const PROCESS_ALL_ACCESS = &H1F0FFF
    Dim f1holder As Integer
    Dim timer_pos As Long

    'API Declaration
    Public Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
    Public Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
    Public Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
    Public Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
    Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Long
    Public Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer
    Public Declare Function ReadProcessMem Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByRef lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long

    Public Function WriteAByte(gamewindowtext As String, address As Long, value As Byte)
    Dim hwnd As Long
    Dim pid As Long
    Dim phandle As Long
    hwnd = FindWindow(vbNullString, gamewindowtext)
    If (hwnd = 0) Then
    MsgBox "The Game Is Not Working", vbCritical, "Error"
    End
    Exit Function
    End If
    GetWindowThreadProcessId hwnd, pid
    phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    If (phandle = 0) Then
    MsgBox "Can't get ProcessId", vbCritical, "Error"
    Exit Function
    End If
    WriteProcessMemory phandle, address, value, 1, 0&
    CloseHandle hProcess
    End Function

    Public Function WriteAnInt(gamewindowtext As String, address As Long, value As Integer)
    Dim hwnd As Long
    Dim pid As Long
    Dim phandle As Long
    hwnd = FindWindow(vbNullString, gamewindowtext)
    If (hwnd = 0) Then
    MsgBox "The Game Is Not Working", vbCritical, "Error"
    End
    End If
    GetWindowThreadProcessId hwnd, pid
    phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    If (phandle = 0) Then
    MsgBox "The Game Is Not Working", vbCritical, "Error"
    Exit Function
    End If
    WriteProcessMemory phandle, address, value, 2, 0&
    CloseHandle hProcess
    End Function

    Public Function WriteALong(gamewindowtext As String, address As Long, value As Long)
    Dim hwnd As Long
    Dim pid As Long
    Dim phandle As Long
    hwnd = FindWindow(vbNullString, gamewindowtext)
    If (hwnd = 0) Then
    MsgBox "The Game Is Not Working", vbCritical, "Error"
    End
    Exit Function
    End If
    GetWindowThreadProcessId hwnd, pid
    phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    If (phandle = 0) Then
    MsgBox "The Game Is Not Working", vbCritical, "Error"
    Exit Function
    End If
    WriteProcessMemory phandle, address, value, 4, 0&
    CloseHandle hProcess
    End Function

    Public Function ReadAByte(gamewindowtext As String, address As Long, valbuffer As Byte)
    Dim hwnd As Long
    Dim pid As Long
    Dim phandle As Long
    hwnd = FindWindow(vbNullString, gamewindowtext)
    If (hwnd = 0) Then
    MsgBox "The Game Is Not Working", vbCritical, "Error"
    End
    Exit Function
    End If
    GetWindowThreadProcessId hwnd, pid
    phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    If (phandle = 0) Then
    MsgBox "The Game Is Not Working", vbCritical, "Error"
    Exit Function
    End If
    ReadProcessMem phandle, address, valbuffer, 1, 0&
    CloseHandle hProcess
    End Function

    Public Function ReadAnInt(gamewindowtext As String, address As Long, valbuffer As Integer)
    Dim hwnd As Long
    Dim pid As Long
    Dim phandle As Long
    hwnd = FindWindow(vbNullString, gamewindowtext)
    If (hwnd = 0) Then
    MsgBox "The Game Is Not Working", vbCritical, "Error"
    End
    Exit Function
    End If
    GetWindowThreadProcessId hwnd, pid
    phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    If (phandle = 0) Then
    MsgBox "The Game Is Not Working", vbCritical, "Error"
    Exit Function
    End If
    ReadProcessMem phandle, address, valbuffer, 2, 0&
    CloseHandle hProcess
    End Function

    Public Function ReadALong(gamewindowtext As String, address As Long, valbuffer As Long)
    Dim hwnd As Long
    Dim pid As Long
    Dim phandle As Long
    hwnd = FindWindow(vbNullString, gamewindowtext)
    If (hwnd = 0) Then
    MsgBox "The Game Is Not Working", vbCritical, "Error"
    End
    Exit Function
    End If
    GetWindowThreadProcessId hwnd, pid
    phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    If (phandle = 0) Then
    MsgBox "The Game Is Not Working", vbCritical, "Error"
    Exit Function
    End If
    ReadProcessMem phandle, address, valbuffer, 4, 0&
    CloseHandle hProcess
    End Function
    Public Function ReadAFloat(gamewindowtext As String, address As Long, valbuffer As Single)
    Dim hwnd As Long
    Dim pid As Long
    Dim phandle As Long
    hwnd = FindWindow(vbNullString, gamewindowtext)
    If (hwnd = 0) Then
    MsgBox "The Game Is Not Working", vbCritical, "Error"
    End
    Exit Function
    End If

    GetWindowThreadProcessId hwnd, pid
    phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    If (phandle = 0) Then
    MsgBox "Can't get ProcessId", vbCritical, "Error"
    Exit Function
    End If

    ReadProcessMem phandle, address, valbuffer, 4, 0&
    CloseHandle hProcess
    End Function

    Public Function WriteAFloat(gamewindowtext As String, address As Long, value As Single)
    Dim hwnd As Long
    Dim pid As Long
    Dim phandle As Long

    hwnd = FindWindow(vbNullString, gamewindowtext)
    If (hwnd = 0) Then
    MsgBox "The Game Is Not Working", vbCritical, "Error"
    End
    Exit Function
    End If

    GetWindowThreadProcessId hwnd, pid
    phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    If (phandle = 0) Then
    MsgBox "Can't get ProcessId", vbCritical, "Error"
    Exit Function
    End If

    WriteProcessMemory phandle, address, value, 4, 0&
    CloseHandle hProcess
    End Function
    ---------------------------
    than in the timer this code...
    Private Sub Timer1_Timer()
    Call WriteALong("WarRock", &H8B9B04, 1120403456)
    End Sub
    right ? :P

  7. #7
    str1k3r21's Avatar
    Join Date
    Mar 2007
    Posts
    166
    Reputation
    11
    Thanks
    51
    Quote Originally Posted by bohnenbong View Post
    i have this 2 buttons in the first i copy from tut ,
    Timer1.Interval = 1
    in the second
    Timer1.Interval = 0
    -------------------
    In the Form comes this code ...


    ---------------------------
    than in the timer this code...


    right ? :P

    and it dosent work?


    il send u private message,
    Last edited by str1k3r21; 10-26-2007 at 06:56 AM.

  8. #8
    Threadstarter
    Advanced Member
    bohnenbong's Avatar
    Join Date
    Oct 2007
    Gender
    male
    Location
    On the toilette^^
    Posts
    222
    Reputation
    10
    Thanks
    47
    I want to try it again and than that -.-
    The same error like before,
    and this is red
    "Public Const PROCESS_ALL_ACCESS = &H1F0FFF"







    -----------
    NO ERROR ANYMORE!
    So now i try it out....
    Last edited by bohnenbong; 10-26-2007 at 07:09 AM.

Similar Threads

  1. [Source Code] What Wrong with this code?
    By DaRk in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 15
    Last Post: 08-06-2011, 12:55 PM
  2. [Help] What is wrong with this code!
    By killer660 in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 14
    Last Post: 08-01-2011, 09:55 AM
  3. [Help] What is wrong with this code?
    By IGNITE09178 in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 15
    Last Post: 07-01-2011, 03:59 AM
  4. Bad Syntax - What is wrong with this code?
    By HACKINGPIE in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 5
    Last Post: 01-19-2011, 12:12 AM
  5. What is wrong with this code?
    By t7ancients in forum C++/C Programming
    Replies: 10
    Last Post: 10-19-2009, 01:58 PM