Example #1
0
        private List <MenuItem> GetAnimalBombMenu()
        {
            var actionPrefix = "anibomb";
            var menu         = new List <MenuItem>();
            IEnumerable <PedModelListItem> animalModelInfo = PedModelList.GetByType(PedModelType.Animal);

            foreach (var info in animalModelInfo)
            {
                menu.Add(new MenuItem()
                {
                    text   = info.Name,
                    action = $"{actionPrefix} {info.Model}",
                    key    = info.Model,
                });
            }

            return(menu);
        }
Example #2
0
        public override Dictionary <string, List <MenuItem> > AddMenus(Dictionary <string, List <MenuItem> > menus)
        {
            menus["player"] = new List <MenuItem>()
            {
                new MenuItem()
                {
                    text = "Change Skin",
                    sub  = "player.skin"
                },
                new MenuItem()
                {
                    text      = "Godmode",
                    action    = "player god",
                    state     = "ON",
                    configkey = "GodMode"
                },
                new MenuItem()
                {
                    text      = "Unlimited Stamina",
                    action    = "player stamina",
                    state     = "ON",
                    configkey = "InfiniteStamina"
                },
                new MenuItem()
                {
                    text   = "Heal Player",
                    action = "player heal"
                },
                new MenuItem()
                {
                    text   = "Add Armor",
                    action = "player armor"
                },
                new MenuItem()
                {
                    text   = "Suicide",
                    action = "player suicide"
                },
                new MenuItem()
                {
                    text      = "Auto Plane Parachute",
                    action    = "player autochute",
                    state     = "ON",
                    configkey = "AutoGiveParachute"
                },
                new MenuItem()
                {
                    text   = "Give Parachute",
                    action = "wepgive GADGET_PARACHUTE"
                },
            };

            menus["player.skin"] = new List <MenuItem>()
            {
                new MenuItem()
                {
                    text = "Recent",
                    sub  = "player.skin.recent"
                },
                new MenuItem()
                {
                    text = "Animals",
                    sub  = "player.skin.animals"
                },
                new MenuItem()
                {
                    text = "Main Characters",
                    sub  = "player.skin.mainCharacters"
                },
                new MenuItem()
                {
                    text = "Pedestrians",
                    sub  = "player.skin.pedestrians"
                },
                new MenuItem()
                {
                    text = "Custom",
                    sub  = "player.skin.custom"
                },
                new MenuItem()
                {
                    text   = "Save Current Skin as Default",
                    action = "savedefaultskin"
                },
                new MenuItem()
                {
                    text   = "Change to Default Skin",
                    action = "loaddefaultskin"
                },
                new MenuItem()
                {
                    text      = "Autoload Default Skin",
                    action    = "autoloaddefaultskin",
                    state     = "ON",
                    configkey = "AutoLoadDefaultSkin"
                },
            };

            menus["player.skin.recent"]         = GetRecentSkinMenu();
            menus["player.skin.animals"]        = ToMenuItems(PedModelList.GetByType(PedModelType.Animal));
            menus["player.skin.mainCharacters"] = ToMenuItems(PedModelList.GetByType(PedModelType.MainCharacter));
            menus["player.skin.pedestrians"]    = ToMenuItems(PedModelList.GetByType(PedModelType.Human));
            menus["player.skin.custom"]         = ToMenuItems(PedModelList.GetByType(PedModelType.Custom));

            return(menus);
        }