Geplaatst: 16 februari 200718 jaren comment_612393 Hoe kan je de player coordinaten verkrijgen in VB6 van GTA San Andreas? Dankjewel
Geplaatst: 22 februari 200718 jaren comment_617254 Wat heeft option explicit hier mee te maken?Heeft iemand misschien een nuttige oplossing dat ik mijn code werkend kan krijgen? Je code klopt gewoon niet, je maakt bijvoorbeeld gebruik van variablen die niet bestaan. Als je Option Explicit boven in je code zet klaagt de compiler daar over. Als je die er niet neer zet gaat hij gewoon stilletjes fout.
Geplaatst: 9 maart 200718 jaren comment_629352 wat is hier mis mee dan? Public Class Form1 <Flags()> _ Public Enum PROCESS_ACCESS As Long ' Specifies all possible access flags for the process object. PROCESS_ALL_ACCESS = &H1F0FFF ' Enables using the process handle in the CreateRemoteThread function ' to create a thread in the process. PROCESS_CREATE_THREAD = &H2 ' Enables using the process handle as either the source or ' target process in the DuplicateHandle function to duplicate a handle. PROCESS_DUP_HANDLE = &H40 ' Enables using the process handle in the GetExitCodeProcess and ' GetPriorityClass functions to read information from the process object. PROCESS_QUERY_INFORMATION = &H400 ' Enables using the process handle in the SetPriorityClass function to ' set the priority class of the process. PROCESS_SET_INFORMATION = &H200 ' Enables using the process handle in the TerminateProcess function to ' terminate the process. PROCESS_TERMINATE = &H1 ' Enables using the process handle in the VirtualProtectEx and ' WriteProcessMemory functions to modify the virtual memory of the process. PROCESS_VM_OPERATION = &H8 ' Enables using the process handle in the ReadProcessMemory function to ' read from the virtual memory of the process. PROCESS_VM_READ = &H10 ' Enables using the process handle in the WriteProcessMemory function to ' write to the virtual memory of the process. PROCESS_VM_WRITE = &H20 ' Enables using the process handle in any of the wait functions to wait ' for the process to terminate. SYNCHRONIZE = &H100000 End Enum <Runtime.InteropServices.DllImport("kernel32.dll")> _ Public Shared Function ReadProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <Runtime.InteropServices.Out()> ByVal lpBuffer As Byte(), ByVal nSize As UIntPtr, ByVal lpNumberOfBytesRead As IntPtr) As Boolean End Function <Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention:=Runtime.InteropServices.CallingConvention.StdCall, CharSet:=Runtime.InteropServices.CharSet.Auto, SetLastError:=True)> _ Public Shared Function ReadProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByVal lpBuffer As IntPtr, ByVal iSize As Integer, ByRef lpNumberOfBytesRead As Integer) As Boolean End Function Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long Declare Auto Function OpenProcess Lib "kernel32.dll" (ByVal dwDesiredAccess As PROCESS_ACCESS, ByVal bInheritHandle As Boolean, ByVal dwProcessId As Long) As IntPtr Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Double, ByVal lpBuffer As Double, ByVal nSize As Long, ByVal lpNumberOfBytesWritten As Long) As Long Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim gtaproc() As Process Dim gtaprocess As Process Dim StoreGTA As Long Dim strSecond As Long Dim strAndere_1 As System.IntPtr Dim strAndere_2 As System.IntPtr Dim strAndere_3 As System.IntPtr Dim strAndere_4 As System.IntPtr Dim strAndere_5 As System.IntPtr Dim strAndere_6 As System.IntPtr Dim player_ptr As System.IntPtr Dim pos_ptr As System.IntPtr Dim XPos As Long Dim YPos As Long Dim ZPos As Long Dim tmp As Long tmp = Long.Parse("B6F5F0", Globalization.NumberStyles.AllowHexSpecifier) ' Vind het GTA-SanAndreas Window 'strFirst = FindWindow(vbNullString, "GTA: San Andreas") gtaproc = Process.GetProcessesByName("gta_sa") While gtaproc.Length < 1 My.Application.DoEvents() gtaproc = Process.GetProcessesByName("gta_sa") End While If gtaproc.Length > 1 Then Me.Close() End If gtaprocess = gtaproc(0) ' Haal de PID van het window op en sla deze op in de ' StoreGTA long variable strSecond = gtaprocess.Id ' Open het GTA process met alle rechten strAndere_1 = OpenProcess(PROCESS_ACCESS.PROCESS_ALL_ACCESS, False, strSecond) ' Lees het GTA geheugen 'strAndere_2 = ReadProcessMemory(StoreGTA, tmp, player_ptr, 100, 100) strAndere_2 = ReadProcessMemory(strAndere_1, tmp, player_ptr, 100, 100) strAndere_3 = ReadProcessMemory(StoreGTA, pos_ptr.ToInt64 + 14, pos_ptr, 100, 100) strAndere_4 = ReadProcessMemory(StoreGTA, pos_ptr.ToInt64 + 30, XPos, 100, 100) strAndere_5 = ReadProcessMemory(StoreGTA, pos_ptr.ToInt64 + 34, YPos, 100, 100) strAndere_6 = ReadProcessMemory(StoreGTA, pos_ptr.ToInt64 + 38, ZPos, 100, 100) Debug.Print(Long.Parse(strAndere_2, Globalization.NumberStyles.Any)) Debug.Print(Long.Parse(strAndere_3, Globalization.NumberStyles.Any)) Debug.Print(Long.Parse(strAndere_4, Globalization.NumberStyles.Any)) Debug.Print(Long.Parse(strAndere_5, Globalization.NumberStyles.Any)) Debug.Print(Long.Parse(strAndere_6, Globalization.NumberStyles.Any)) Debug.Print(Long.Parse(player_ptr, Globalization.NumberStyles.Any)) Debug.Print(Long.Parse(pos_ptr, Globalization.NumberStyles.Any)) Debug.Print(Long.Parse(XPos, Globalization.NumberStyles.Any)) Debug.Print(Long.Parse(YPos, Globalization.NumberStyles.Any)) Debug.Print(Long.Parse(ZPos, Globalization.NumberStyles.Any)) End Sub End Class is dit beter? want ik krijg allemaal nullen te zien. maar dat ligt volgens mij aan mijn gta want met de sa placemannager krijg ik ook allemaal nullen
Geplaatst: 10 maart 200718 jaren comment_629639 wat is hier mis mee dan? [...] is dit beter? want ik krijg allemaal nullen te zien. maar dat ligt volgens mij aan mijn gta want met de sa placemannager krijg ik ook allemaal nullen Van de code heb ik geen verstand, maar zorg er wel voor dat je GTASA V1 hebt en dat er niet mee geknoeit is. Dan moet SA PlaceManager wel werken
Hoe kan je de player coordinaten verkrijgen in VB6 van GTA San Andreas?
Dankjewel