Esempio n. 1
0
        public static void UpdateOffsets()
        {
            if ((DateTime.Now - _lastUpdatedOffset).TotalMinutes > 1)
            {
                try {
                    Process process = Process.GetProcessesByName("csgo")[0];
                    SignatureScan.Process = process;
                    SignatureScan.Address = IntPtr.Zero;
                    SignatureScan.Size    = MAX_DUMP_SIZE;

                    int  clientDll     = SignatureScan.GetModuleBaseAddressByName(process, "client.dll").ToInt32();
                    long clientDllSize = SignatureScan.GetModuleSize(process, "client.dll");
                    int  engineDll     = SignatureScan.GetModuleBaseAddressByName(process, "engine.dll").ToInt32();
                    long engineDllSize = SignatureScan.GetModuleSize(process, "engine.dll");
                    FindWeaponOffset(clientDll, clientDllSize);
                    FindTeamnumOffset(clientDll, clientDllSize);
                    FindHealthOffset(clientDll, clientDllSize);
                    FindVecOriginOffset(clientDll, clientDllSize);
                    FindBonematrixOffset(clientDll, clientDllSize);
                    FindDormantOffset(clientDll, clientDllSize);
                    FindGameRulesProxyOffset(clientDll, clientDllSize);
                    FindViewAnglesOffset(engineDll, engineDllSize);
                    FindClientstateOffset(engineDll, engineDllSize);
                    FindEntitylistOffset(clientDll, clientDllSize);
                    FindLocalPlayerOffset(clientDll, clientDllSize);
                    _lastUpdatedOffset = DateTime.Now;
                } catch {
                    if (Program.Settings.UseSounds)
                    {
                        Console.Beep(400, 100);
                    }
                }
            }
        }