public FreemodeMenu() { menuPool = new MenuPool(); mainMenu = new UIMenu(Strings.INTERACTION_TITLE, Strings.INTERACTION_SUBTITLE) { MouseControlsEnabled = false, ControlDisablingEnabled = false }; mainMenu.DisableInstructionalButtons(true); menuPool.Add(mainMenu); toggleCeoItem = new UIMenuItem(Strings.INTERACTION_ITEM_CEO); mainMenu.OnItemSelect += new ItemSelectEvent((menu, item, pos) => { if (item == toggleCeoItem) { if (OrganizationsHolder.GetPlayerOrganization(Game.Player) == OrganizationType.NONE) { OrganizationType freeOrganizationType = OrganizationsHolder.GetNextEmptyOrganization(); if (freeOrganizationType == OrganizationType.NONE) { Screen.ShowNotification(Strings.INTERACTION_ITEM_CEO_NONAVAIL, true); } else { OrganizationsHolder.SetPlayerOrganization(freeOrganizationType); } } else { OrganizationsHolder.SetPlayerOrganization(OrganizationType.NONE); } } }); killYourselfItem = new UIMenuItem(Strings.INTERACTION_ITEM_KYS); mainMenu.OnItemSelect += new ItemSelectEvent((menu, item, pos) => { if (item == killYourselfItem) { Game.PlayerPed.Kill(); } }); Tick += OnTick; }
private BlipColor GetPlayerSuitableBlipColor(Player player) { switch (OrganizationsHolder.GetPlayerOrganization(player)) { case OrganizationType.ONE: return(BlipColor.TrevorOrange); case OrganizationType.TWO: return(BlipColor.FranklinGreen); case OrganizationType.THREE: return(BlipColor.MichaelBlue); case OrganizationType.FOUR: return(BlipColor.Yellow); default: return(BlipColor.White); } }