Example #1
0
 private static void ToggleThirdperson()
 {
     Thirdperson = !Thirdperson;
     RPC.Cbuff_AddText(0, "cg_thirdPerson " + (Thirdperson ? "ON" : "OFF"));
 }
Example #2
0
 private static void ToggleNotarget()
 {
     Notarget = !Notarget;
     RPC.Cbuff_AddText(0, "notarget " + (Notarget ? "ON" : "OFF"));
 }
Example #3
0
 private static void ToggleUFO()
 {
     UFO = !UFO;
     RPC.Cbuff_AddText(0, "ufo " + (UFO ? "ON" : "OFF"));
 }
Example #4
0
 private static void ToggleNoclip()
 {
     Noclip = !Noclip;
     RPC.Cbuff_AddText(0, "noclip " + (Noclip ? "ON" : "OFF"));
 }
Example #5
0
 private static void ToggleGodmode()
 {
     Godmode = !Godmode;
     RPC.Cbuff_AddText(0, "god " + (Godmode ? "ON" : "OFF"));
 }
Example #6
0
        private static void GiveItem()
        {
            string itemname = (string)MenuStruct[Menu_Index][Scroller_Index].optionParameter;

            RPC.Cbuff_AddText(0, "give " + itemname);
        }
Example #7
0
        public static void MenuLoop()
        {
            Menu_Struct();

            PS3.ConnectTarget();//Don't know why, but these are needed again..?
            PS3.AttachProcess();
            RPC.Init();

            while (true)
            {
                Thread.Sleep(100);

                if (Menu_Open)//If menu is opened
                {
                    //If left is held (Close menu / go back a menu)
                    if (buttonPressed(Buttons.Left))
                    {
                        Console.WriteLine("DPAD LEFT pressed");
                        Menu_Index     = 0;
                        Scroller_Index = 0;
                        FPS.Text       = "Hold RIGHT to open";
                        Menu_Open      = false;
                    }

                    //If dpad up is pressed (scroll up)
                    if (buttonPressed(Buttons.Up))
                    {
                        Console.WriteLine("DPAD UP pressed");
                        Scroller_Index = (Scroller_Index != 0) ? Scroller_Index - 1 : MenuStruct[Menu_Index].Count - 1;
                        UpdateMenu();
                    }

                    //If dpad down is pressed (scroll down)
                    if (buttonPressed(Buttons.Down))
                    {
                        Console.WriteLine("DPAD DOWN pressed");
                        Scroller_Index = (Scroller_Index != MenuStruct[Menu_Index].Count - 1) ? Scroller_Index + 1 : 0;
                        UpdateMenu();
                    }

                    //If square is pressed (select)
                    if (buttonPressed(Buttons.Square))
                    {
                        Console.WriteLine("SQUARE pressed");
                        MenuStruct[Menu_Index][Scroller_Index].optionFunction?.Invoke();
                    }
                }
                else //if menu is closed
                {
                    //If dpad right is held (Open menu)
                    if (buttonPressed(Buttons.Right))
                    {
                        Console.WriteLine("DPAD RIGHT pressed");
                        Menu_Index     = 0;
                        Scroller_Index = 0;
                        UpdateMenu();
                        Menu_Open = true;
                    }
                }
            }
        }