Esempio n. 1
0
        private void WatchProcess()
        {
            while (true)
            {
                var procs = Process.GetProcessesByName("RobloxPlayerBeta");
                if (procs.Length > 0 && procs.First().Id != CurrentPID)
                {
                    Roblox     = procs.First();
                    CurrentPID = Roblox.Id;

                    Thread.Sleep(2000); // Delay

                    Sharp = new MemorySharp(Roblox);

                    SigScanSharp Sigscan = new SigScanSharp(Roblox.Handle);
                    Sigscan.SelectModule(Roblox.MainModule);

                    IntPtr GetTaskscheduler = traceRelativeCall(Roblox.Handle, Sigscan.FindPattern("E8 ? ? ? ? 8A 4D 08 83 C0 04"));

                    Taskscheduler = new RemotePointer(Sharp, GetTaskscheduler).Execute <IntPtr>();
                    DelayOffset   = FindTaskSchedulerFrameDelayOffset(Roblox.Handle, Taskscheduler);

                    WriteMemory <double>(Roblox.Handle, Taskscheduler + DelayOffset, CurrentFps);
                }
                Thread.Sleep(500);
            }
        }
Esempio n. 2
0
        private string HexFind(string text, uint baseadd, uint sub)
        {
            long lTime;
            var  offset = Sigscan.FindPattern(text, out lTime);

            offset = offset + 0 - baseadd - sub;
            string hexValue2 = offset.ToString("X");

            return(hexValue2 + Environment.NewLine);
        }
Esempio n. 3
0
        private void OpenGame()
        {
            Console.WriteLine("RageMP teleporter by Oniel special for EZcheats.RU!");
            Process      TargetProcess = Process.GetProcessesByName("GTA5")[0];
            SigScanSharp Sigscan       = new SigScanSharp(TargetProcess.Handle);

            Sigscan.SelectModule(TargetProcess.MainModule);


            if (MemLib.OpenProcess("GTA5"))
            {
                var dwBlip  = Sigscan.FindPattern("4C 8D 05 ? ? ? ? 0F B7 C1");
                var dwWorld = Sigscan.FindPattern("48 8B 05 ? ? ? ? 48 8B 58 08 48 85 DB 74 32");

                dwWorld = dwWorld + (ulong)(MemLib.ReadInt(sHEX(dwWorld + (ulong)3)) + 7);
                dwBlip  = dwBlip + (ulong)(MemLib.ReadInt(sHEX(dwBlip + (ulong)3)) + 7);

                float fPlayerX = MemLib.ReadFloat(sHEX(dwWorld) + ",0x8,0x30,0x50");
                float fPlayerY = MemLib.ReadFloat(sHEX(dwWorld) + ",0x8,0x30,0x54");

                /*
                 * float fPlayerZ = MemLib.ReadFloat(sHEX(dwWorld) + ",0x8,0x30,0x58");
                 *
                 * float fVehicleX = MemLib.ReadFloat(sHEX(dwWorld) + ",0x8,0xD28,0x30,0x50");
                 * float fVehicleY = MemLib.ReadFloat(sHEX(dwWorld) + ",0x8,0xD28,0x30,0x54");
                 * float fVehicleZ = MemLib.ReadFloat(sHEX(dwWorld) + ",0x8,0xD28,0x30,0x58");
                 */
                float fBlipX = fPlayerX;
                float fBlipY = fPlayerY;

                while (true)
                {
                    byte[] f3 = BitConverter.GetBytes(Proc.GetAsyncKeyState(0x72));
                    byte[] f4 = BitConverter.GetBytes(Proc.GetAsyncKeyState(0x73));
                    //byte[] f5 = BitConverter.GetBytes(Proc.GetAsyncKeyState(0x74));
                    if (f3[0] == 1)
                    {
                        for (int i = 0; i < 2000; i++)
                        {
                            var n = MemLib.ReadLong(string.Format("0x{0:X}", dwBlip + (ulong)(i * 8)));
                            if (n > 0 && MemLib.ReadInt(string.Format("0x{0:X}", n + 0x40)) == 8 && MemLib.ReadInt(string.Format("0x{0:X}", n + 0x48)) == 84)
                            {
                                fBlipX = MemLib.ReadFloat(string.Format("0x{0:X}", n + 0x10));
                                fBlipY = MemLib.ReadFloat(string.Format("0x{0:X}", n + 0x14));

                                Console.WriteLine("Teleported to " + fBlipX + ";" + fBlipY);

                                var t1      = MemLib.ReadLong(string.Format("0x{0:X}", dwWorld)) + 0x8;
                                var pointer = MemLib.ReadLong(string.Format("0x{0:X}", t1));

                                if (fBlipX != 0.0 && fBlipY != 0.0)
                                {
                                    MemLib.WriteMemory(sHEX(dwWorld) + ",0x8,0x30,0x50", "float", fBlipX.ToString());
                                    MemLib.WriteMemory(sHEX(dwWorld) + ",0x8,0x30,0x54", "float", fBlipY.ToString());
                                    MemLib.WriteMemory(sHEX(dwWorld) + ",0x8,0x30,0x58", "float", "-200");

                                    MemLib.WriteMemory(string.Format("0x{0:X}", pointer) + "+0x90", "float", fBlipX.ToString());
                                    MemLib.WriteMemory(string.Format("0x{0:X}", pointer) + "+0x94", "float", fBlipY.ToString());
                                    MemLib.WriteMemory(string.Format("0x{0:X}", pointer) + "+0x98", "float", "-200");
                                }
                            }
                        }
                        Console.Beep();
                    }
                    if (f4[0] == 1)
                    {
                        for (int i = 0; i < 2000; i++)
                        {
                            var n = MemLib.ReadLong(string.Format("0x{0:X}", dwBlip + (ulong)(i * 8)));
                            if (n > 0 && MemLib.ReadInt(string.Format("0x{0:X}", n + 0x40)) == 8 && MemLib.ReadInt(string.Format("0x{0:X}", n + 0x48)) == 84)
                            {
                                // get blip position
                                fBlipX = MemLib.ReadFloat(string.Format("0x{0:X}", n + 0x10));
                                fBlipY = MemLib.ReadFloat(string.Format("0x{0:X}", n + 0x14));
                                Console.WriteLine("Teleported to " + fBlipX + ";" + fBlipY);

                                // set vehicle position
                                if (fBlipX != 0.0 && fBlipY != 0.0)
                                {
                                    MemLib.WriteMemory(sHEX(dwWorld) + ",0x8,0xD28,0x30,0x50", "float", fBlipX.ToString());
                                    MemLib.WriteMemory(sHEX(dwWorld) + ",0x8,0xD28,0x30,0x54", "float", fBlipY.ToString());
                                    MemLib.WriteMemory(sHEX(dwWorld) + ",0x8,0xD28,0x30,0x58", "float", "-200");
                                }
                            }
                        }
                        Console.Beep();
                    }
                    // Custom teleport

                    /*
                     * if (f5[0] == 1)
                     * {
                     *  var t1 = MemLib.ReadLong(string.Format("0x{0:X}", dwWorld)) + 0x8;
                     *  var pointer = MemLib.ReadLong(string.Format("0x{0:X}", t1));
                     *
                     *  MemLib.WriteMemory(sHEX(dwWorld) + ",0x8,0x30,0x50", "float", "10");
                     *  MemLib.WriteMemory(sHEX(dwWorld) + ",0x8,0x30,0x54", "float", "10");
                     *  MemLib.WriteMemory(sHEX(dwWorld) + ",0x8,0x30,0x58", "float", "-200");
                     *
                     *  MemLib.WriteMemory(string.Format("0x{0:X}", pointer) + "+0x90", "float", "10");
                     *  MemLib.WriteMemory(string.Format("0x{0:X}", pointer) + "+0x94", "float", "10");
                     *  MemLib.WriteMemory(string.Format("0x{0:X}", pointer) + "+0x98", "float", "-200");
                     *
                     *  Console.Beep();
                     * }
                     */
                    Thread.Sleep(1);
                }
            }
            else
            {
                Console.WriteLine("GTA5.exe not found!");
            }
        }