示例#1
0
        public void runHack(MenuEntry entry)
        {
            MenuEntry e = entry;
            HackList  h = e.hack;

            switch (h)
            {
            case HackList.GODMODE:
                setGodmode(e.toggled);
                break;

            case HackList.OTR:
                setHealth(e.toggled);
                break;

            case HackList.NEVERWANTED:
                if (e.toggled)
                {
                    if (!trRunning)
                    {
                        trRunning = true;
                        t         = new Thread(() =>
                        {
                            while (trRunning)
                            {
                                if (getWanted() != targetWantedLevel)
                                {
                                    setWanted(targetWantedLevel);
                                }

                                Thread.Sleep(100);
                            }
                        })
                        {
                            IsBackground = true
                        };
                        t.SetApartmentState(ApartmentState.STA);
                        t.Name = "WantedLevelThread";
                        t.Start();
                    }
                }
                else
                {
                    trRunning = false;
                }
                break;

            case HackList.WANTEDLVL:
                setWanted((int)e.value);
                break;

            case HackList.SPRINT:
                setSprint((int)e.value);
                break;

            case HackList.SWIM:
                setSwim((int)e.value);
                break;

            case HackList.CARGOD:
                setCargod(e.toggled);
                break;

            case HackList.SEATBELT:
                setSeatbelt(e.toggled);
                break;

            case HackList.ACCELERATION:
                setAccel((int)e.value);
                break;

            case HackList.GRAVITY:
                setGravity((float)e.value);
                break;

            case HackList.INFCLIP:
                setClip(e.toggled);
                break;

            case HackList.INFAMMO:
                setAmmo(e.toggled);
                break;

            case HackList.DUMMY:
                break;

            default:
                break;
            }
        }