public GTA() { Tick += OnTick; KeyDown += OnKeyDown; _menuPool = new MenuPool(); #region TrainerMenu mainMenu = new UIMenu("YTrainer", "~b~YTrainer v0.1"); _menuPool.Add(mainMenu); var GOptions = new UIMenuItem("World & Game Options"); mainMenu.AddItem(GOptions); var COptions = new UIMenuItem("Vehicle Options"); mainMenu.AddItem(COptions); var POptions = new UIMenuItem("Player Options"); mainMenu.AddItem(POptions); var SpawnOptions = new UIMenuItem("Car Spawning"); mainMenu.AddItem(SpawnOptions); var TOptions = new UIMenuItem("Time Options"); mainMenu.AddItem(TOptions); var WeOptions = new UIMenuItem("Weather Options"); mainMenu.AddItem(WeOptions); var WOptions = new UIMenuItem("Weapons Options"); mainMenu.AddItem(WOptions); var TeOptions = new UIMenuItem("Teleports Options"); mainMenu.AddItem(TeOptions); mainMenu.RefreshIndex(); #endregion #region GeneralMenu generalMenu = new UIMenu("World & Game Options", ""); _menuPool.Add(generalMenu); generalMenu.AddItem(HUD = new UIMenuCheckboxItem("Hide Hud and Radar", false)); generalMenu.AddItem(new UIMenuItem("Save Game")); generalMenu.AddItem(nVision = new UIMenuCheckboxItem("Night Vision", false)); generalMenu.RefreshIndex(); generalMenu.OnCheckboxChange += OnCheckboxChange; generalMenu.OnItemSelect += OnItemSelect; #endregion #region VehicleMenu carMenu = new UIMenu("Vehicle Options", ""); _menuPool.Add(carMenu); carMenu.AddItem(CGM = new UIMenuCheckboxItem("Car GodMode", false)); carMenu.AddItem(new UIMenuItem("Flip Car")); carMenu.AddItem(new UIMenuItem("Clean Car")); carMenu.AddItem(DS = new UIMenuCheckboxItem("Default Station", false)); carMenu.AddItem(new UIMenuItem("Drive to Waypoint")); carMenu.AddItem(new UIMenuItem("Stop Drive to Waypoint")); carMenu.AddItem(VisibleC = new UIMenuCheckboxItem("Visible Car", false)); carMenu.AddItem(new UIMenuItem("Repair Car")); carMenu.AddItem(new UIMenuItem("Open Left Front Door")); carMenu.AddItem(new UIMenuItem("Open Right Front Door")); carMenu.AddItem(new UIMenuItem("Open Left Rear Door")); carMenu.AddItem(new UIMenuItem("Open Right Rear Door")); carMenu.AddItem(new UIMenuItem("Open Hood")); carMenu.AddItem(new UIMenuItem("Open Trunk")); carMenu.AddItem(new UIMenuItem("Open All Car Doors")); carMenu.AddItem(new UIMenuItem("Close Left Front Door")); carMenu.AddItem(new UIMenuItem("Close Right Front Door")); carMenu.AddItem(new UIMenuItem("Close Left Rear Door")); carMenu.AddItem(new UIMenuItem("Close Right Rear Door")); carMenu.AddItem(new UIMenuItem("Close Hood")); carMenu.AddItem(new UIMenuItem("Close Trunk")); carMenu.AddItem(new UIMenuItem("Close All Car Doors")); var Colors = new List<dynamic> { "Red","Blue","Black","Green","White","Yellow" }; carMenu.AddItem(CarColors = new UIMenuListItem("Change Car Color", Colors, 0)); carMenu.RefreshIndex(); carMenu.OnCheckboxChange += OnCheckboxChange; carMenu.OnItemSelect += OnItemSelect; carMenu.OnListChange += OnListChange; #endregion #region PlayerMenu playerMenu = new UIMenu("Player Options", ""); _menuPool.Add(playerMenu); playerMenu.AddItem(GM = new UIMenuCheckboxItem("God Mode", false)); playerMenu.AddItem(UA = new UIMenuCheckboxItem("Unlimited Ammo", false)); playerMenu.AddItem(uAbility = new UIMenuCheckboxItem("Unlimited Ability", false)); var Wanted = new List<dynamic> { "0", "1", "2", "3", "4", "5", }; playerMenu.AddItem(WantedLevel = new UIMenuListItem("Wanted Level", Wanted, 0)); playerMenu.AddItem(new UIMenuItem("Give Money")); playerMenu.AddItem(VisibleP = new UIMenuCheckboxItem("Player Visible", false)); playerMenu.AddItem(NW = new UIMenuCheckboxItem("Never Wanted", false)); playerMenu.AddItem(new UIMenuItem("Add Health")); playerMenu.AddItem(new UIMenuItem("Add Armour")); playerMenu.AddItem(mRadio = new UIMenuCheckboxItem("Radio Menu", false)); playerMenu.AddItem(fastRun = new UIMenuCheckboxItem("Fast Run", false)); playerMenu.AddItem(fastSwim = new UIMenuCheckboxItem("Fast Swim", false)); playerMenu.RefreshIndex(); playerMenu.OnCheckboxChange += OnCheckboxChange; playerMenu.OnItemSelect += OnItemSelect; playerMenu.OnListChange += OnListChange; #endregion #region TimeMenu timeMenu = new UIMenu("Time Options", ""); _menuPool.Add(timeMenu); timeMenu.AddItem(new UIMenuItem("Slow Motion 25%")); timeMenu.AddItem(new UIMenuItem("Slow Motion 50%")); timeMenu.AddItem(new UIMenuItem("Slow Motion 75%")); timeMenu.AddItem(new UIMenuItem("Normal Game Speed")); timeMenu.AddItem(new UIMenuItem("Fast Motion")); timeMenu.AddItem(new UIMenuItem("Noon (12)")); timeMenu.AddItem(new UIMenuItem("AfterNoon (18)")); timeMenu.AddItem(new UIMenuItem("Evening (23)")); timeMenu.AddItem(new UIMenuItem("Night (5)")); timeMenu.AddItem(new UIMenuItem("Ahead One Hour")); timeMenu.AddItem(new UIMenuItem("Back One Hour")); timeMenu.AddItem(SyncTime = new UIMenuCheckboxItem("Real Time", false)); var Days = new List<dynamic> { "Sunday", //2 "Monday",//3 "Tuesday", //4 "Thursday", //6 "Wednesday", //5 "Friday", //7 "Saturday" //1 }; timeMenu.AddItem(DOH = new UIMenuListItem("Choose Day", Days, 0)); timeMenu.RefreshIndex(); timeMenu.OnItemSelect += OnItemSelect; timeMenu.OnListChange += OnListChange; #endregion #region WeatherMenu weatherMenu = new UIMenu("Weather Options", ""); _menuPool.Add(weatherMenu); weatherMenu.AddItem(new UIMenuItem("Blizzard")); weatherMenu.AddItem(new UIMenuItem("Christmas")); weatherMenu.AddItem(new UIMenuItem("Clear")); weatherMenu.AddItem(new UIMenuItem("Clearing")); weatherMenu.AddItem(new UIMenuItem("Clouds")); weatherMenu.AddItem(new UIMenuItem("Extra Sunny")); weatherMenu.AddItem(new UIMenuItem("Foggy")); weatherMenu.AddItem(new UIMenuItem("Neutral")); weatherMenu.AddItem(new UIMenuItem("Overcast")); weatherMenu.AddItem(new UIMenuItem("Raining")); weatherMenu.AddItem(new UIMenuItem("Smog")); weatherMenu.AddItem(new UIMenuItem("Snowing")); weatherMenu.AddItem(new UIMenuItem("Snowlight")); weatherMenu.AddItem(new UIMenuItem("Thunder Storm")); weatherMenu.RefreshIndex(); weatherMenu.OnItemSelect += OnItemSelect; #endregion #region WeaponMenu weaponMenu = new UIMenu("Weapons Options", ""); _menuPool.Add(weaponMenu); weaponMenu.AddItem(new UIMenuItem("Baseball Bat")); weaponMenu.AddItem(new UIMenuItem("Knife")); weaponMenu.AddItem(new UIMenuItem("Nightstick")); weaponMenu.AddItem(new UIMenuItem("Crowbar")); weaponMenu.AddItem(new UIMenuItem("Golf Club")); weaponMenu.AddItem(new UIMenuItem("Hammer")); weaponMenu.AddItem(new UIMenuItem("Broken Bottle")); weaponMenu.AddItem(new UIMenuItem("Antique Cavalry Dagger")); weaponMenu.AddItem(new UIMenuItem("Hatchet")); weaponMenu.AddItem(new UIMenuItem("Knuckledusters")); weaponMenu.AddItem(new UIMenuItem("Machete")); weaponMenu.AddItem(new UIMenuItem("Flashlight")); weaponMenu.AddItem(new UIMenuItem("Pistol")); weaponMenu.AddItem(new UIMenuItem("Combat Pistol")); weaponMenu.AddItem(new UIMenuItem("AP Pistol")); weaponMenu.AddItem(new UIMenuItem("Stun Gun")); weaponMenu.AddItem(new UIMenuItem("Pistol .50")); weaponMenu.AddItem(new UIMenuItem("SNS Pistol")); weaponMenu.AddItem(new UIMenuItem("Heavy Pistol")); weaponMenu.AddItem(new UIMenuItem("Vintage Pistol")); weaponMenu.AddItem(new UIMenuItem("Flare Gun")); weaponMenu.AddItem(new UIMenuItem("Marksman Pistol")); weaponMenu.AddItem(new UIMenuItem("Micro SMG")); weaponMenu.AddItem(new UIMenuItem("SMG")); weaponMenu.AddItem(new UIMenuItem("Assault SMG")); weaponMenu.AddItem(new UIMenuItem("Combat PDW")); weaponMenu.AddItem(new UIMenuItem("Machine Pistol")); weaponMenu.AddItem(new UIMenuItem("Pump Shotgun")); weaponMenu.AddItem(new UIMenuItem("Sawed-Off Shotgun")); weaponMenu.AddItem(new UIMenuItem("Assault Shotgun")); weaponMenu.AddItem(new UIMenuItem("Bullpup Shotgun")); weaponMenu.AddItem(new UIMenuItem("Musket")); weaponMenu.AddItem(new UIMenuItem("Heavy Shotgun")); weaponMenu.AddItem(new UIMenuItem("Assault Rifle")); weaponMenu.AddItem(new UIMenuItem("Carbine Rifle")); weaponMenu.AddItem(new UIMenuItem("Advanced Rifle")); weaponMenu.AddItem(new UIMenuItem("Special Carbine")); weaponMenu.AddItem(new UIMenuItem("Bullpup Rifle")); weaponMenu.AddItem(new UIMenuItem("MG")); weaponMenu.AddItem(new UIMenuItem("Combat MG")); weaponMenu.AddItem(new UIMenuItem("Gusenberg Sweeper")); weaponMenu.AddItem(new UIMenuItem("Sniper Rifle")); weaponMenu.AddItem(new UIMenuItem("Heavy Sniper")); weaponMenu.AddItem(new UIMenuItem("Marksman Rifle")); weaponMenu.AddItem(new UIMenuItem("RPG")); weaponMenu.AddItem(new UIMenuItem("Grenade Launcher")); weaponMenu.AddItem(new UIMenuItem("Grenade Launcher Smoke")); weaponMenu.AddItem(new UIMenuItem("Minigun")); weaponMenu.AddItem(new UIMenuItem("Firework Launcher")); weaponMenu.AddItem(new UIMenuItem("Rail Gun")); weaponMenu.AddItem(new UIMenuItem("Homing Launcher")); weaponMenu.AddItem(new UIMenuItem("Grenade")); weaponMenu.AddItem(new UIMenuItem("Sticky Bomb")); weaponMenu.AddItem(new UIMenuItem("Tear Gas")); weaponMenu.AddItem(new UIMenuItem("Molotov Cocktail")); weaponMenu.AddItem(new UIMenuItem("Proximity Mine")); weaponMenu.AddItem(new UIMenuItem("Snowball")); weaponMenu.AddItem(new UIMenuItem("BZ Gas")); weaponMenu.AddItem(new UIMenuItem("Fire Extinguisher")); weaponMenu.AddItem(new UIMenuItem("Jerry Can")); weaponMenu.AddItem(new UIMenuItem("Digiscanner")); weaponMenu.AddItem(new UIMenuItem("Parachute")); weaponMenu.RefreshIndex(); weaponMenu.OnItemSelect += OnItemSelect; #endregion #region TeleportMenu teleportMenu = new UIMenu("Teleports Options", ""); _menuPool.Add(teleportMenu); var TSpaceship = new List<dynamic> { "1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20", "21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40", "41","42","43","44","45","46","47","48","49","50", }; var TLetter = new List<dynamic> { "1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20", "21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40", "41","42","43","44","45","46","47","48","49","50", }; teleportMenu.AddItem(Spaceship = new UIMenuListItem("Spaceship", TSpaceship, 0)); teleportMenu.AddItem(LetterScraps = new UIMenuListItem("Letter Scraps", TLetter, 0)); teleportMenu.AddItem(new UIMenuItem("Teleport to WayPoint")); teleportMenu.AddItem(new UIMenuItem("Teleport to Safehouse")); teleportMenu.AddItem(new UIMenuItem("Teleport to AmmuNation")); teleportMenu.AddItem(new UIMenuItem("Teleport to AmmuNation with shooting range")); teleportMenu.AddItem(new UIMenuItem("Teleport to Garage")); teleportMenu.AddItem(new UIMenuItem("Teleport to Barber Shop")); teleportMenu.RefreshIndex(); teleportMenu.OnListChange += OnListChange; teleportMenu.OnItemSelect += OnItemSelect; #endregion #region SpawnVehicleMenu spawnMenu = new UIMenu("Car Spawning", ""); _menuPool.Add(spawnMenu); spawnMenu.AddItem(new UIMenuItem("Adder")); spawnMenu.AddItem(new UIMenuItem("Airbus")); spawnMenu.AddItem(new UIMenuItem("Airtug")); spawnMenu.AddItem(new UIMenuItem("Akuma")); spawnMenu.AddItem(new UIMenuItem("Ambulance")); spawnMenu.AddItem(new UIMenuItem("Annihilator")); spawnMenu.AddItem(new UIMenuItem("Aseat")); spawnMenu.AddItem(new UIMenuItem("Aseat2 ")); spawnMenu.AddItem(new UIMenuItem("Asterope")); spawnMenu.AddItem(new UIMenuItem("Bagger")); spawnMenu.AddItem(new UIMenuItem("Baller")); spawnMenu.AddItem(new UIMenuItem("Baller2")); spawnMenu.AddItem(new UIMenuItem("Banshee")); spawnMenu.AddItem(new UIMenuItem("Barracks")); spawnMenu.AddItem(new UIMenuItem("Barracks2")); spawnMenu.AddItem(new UIMenuItem("Bati")); spawnMenu.AddItem(new UIMenuItem("Bati2")); spawnMenu.AddItem(new UIMenuItem("Benson")); spawnMenu.AddItem(new UIMenuItem("Bfinjection")); spawnMenu.AddItem(new UIMenuItem("Biff")); spawnMenu.AddItem(new UIMenuItem("Bison")); spawnMenu.AddItem(new UIMenuItem("Bison2")); spawnMenu.AddItem(new UIMenuItem("Bison3")); spawnMenu.AddItem(new UIMenuItem("Bjkl ")); spawnMenu.AddItem(new UIMenuItem("Blazer")); spawnMenu.AddItem(new UIMenuItem("Blazer2")); spawnMenu.AddItem(new UIMenuItem("Blazer3")); spawnMenu.AddItem(new UIMenuItem("Blimp")); spawnMenu.AddItem(new UIMenuItem("Blista")); spawnMenu.AddItem(new UIMenuItem("Bmx")); spawnMenu.AddItem(new UIMenuItem("Bobcatxl")); spawnMenu.AddItem(new UIMenuItem("Bodhi2")); spawnMenu.AddItem(new UIMenuItem("Boxvillet")); spawnMenu.AddItem(new UIMenuItem("Boxvillet2")); spawnMenu.AddItem(new UIMenuItem("Boxvillet3")); spawnMenu.AddItem(new UIMenuItem("Buccaner")); spawnMenu.AddItem(new UIMenuItem("Buffalo")); spawnMenu.AddItem(new UIMenuItem("Buffalo2")); spawnMenu.AddItem(new UIMenuItem("Bulldozer")); spawnMenu.AddItem(new UIMenuItem("Bullet ")); spawnMenu.AddItem(new UIMenuItem("Burrito")); spawnMenu.AddItem(new UIMenuItem("Burrito2")); spawnMenu.AddItem(new UIMenuItem("Burrito3")); spawnMenu.AddItem(new UIMenuItem("Burrito4")); spawnMenu.AddItem(new UIMenuItem("Burrito5")); spawnMenu.AddItem(new UIMenuItem("Bus")); spawnMenu.AddItem(new UIMenuItem("Buzzard")); spawnMenu.AddItem(new UIMenuItem("Buzzard2")); spawnMenu.AddItem(new UIMenuItem("Caddy")); spawnMenu.AddItem(new UIMenuItem("Caddy2")); spawnMenu.AddItem(new UIMenuItem("Camper")); spawnMenu.AddItem(new UIMenuItem("Carbonizzare")); spawnMenu.AddItem(new UIMenuItem("Carbonrs")); spawnMenu.AddItem(new UIMenuItem("Cargobob")); spawnMenu.AddItem(new UIMenuItem("Cargobob2")); spawnMenu.AddItem(new UIMenuItem("Cargobob3 ")); spawnMenu.AddItem(new UIMenuItem("Cargoplane")); spawnMenu.AddItem(new UIMenuItem("Cavalcade")); spawnMenu.AddItem(new UIMenuItem("Cavalcade2")); spawnMenu.AddItem(new UIMenuItem("Cheetah")); spawnMenu.AddItem(new UIMenuItem("Coach")); spawnMenu.AddItem(new UIMenuItem("Cogcabrio")); spawnMenu.AddItem(new UIMenuItem("Comet2")); spawnMenu.AddItem(new UIMenuItem("Coquette")); spawnMenu.AddItem(new UIMenuItem("Cruiser")); spawnMenu.AddItem(new UIMenuItem("Crusade")); spawnMenu.AddItem(new UIMenuItem("Cuban800")); spawnMenu.AddItem(new UIMenuItem("Cutter")); spawnMenu.AddItem(new UIMenuItem("Daemon")); spawnMenu.AddItem(new UIMenuItem("Dilettante")); spawnMenu.AddItem(new UIMenuItem("Dilettante2")); spawnMenu.AddItem(new UIMenuItem("Dinghy")); spawnMenu.AddItem(new UIMenuItem("Dinghy2")); spawnMenu.AddItem(new UIMenuItem("Dloader")); spawnMenu.AddItem(new UIMenuItem("Docktug")); spawnMenu.AddItem(new UIMenuItem("Dominator")); spawnMenu.AddItem(new UIMenuItem("Double")); spawnMenu.AddItem(new UIMenuItem("Dubsta")); spawnMenu.AddItem(new UIMenuItem("Dubsta2")); spawnMenu.AddItem(new UIMenuItem("Dump")); spawnMenu.AddItem(new UIMenuItem("Dune")); spawnMenu.AddItem(new UIMenuItem("Dune2")); spawnMenu.AddItem(new UIMenuItem("Duster")); spawnMenu.AddItem(new UIMenuItem("Elegy2")); spawnMenu.AddItem(new UIMenuItem("Emperor")); spawnMenu.AddItem(new UIMenuItem("Emperor2")); spawnMenu.AddItem(new UIMenuItem("Emperor3")); spawnMenu.AddItem(new UIMenuItem("Entityxf")); spawnMenu.AddItem(new UIMenuItem("Exemplar")); spawnMenu.AddItem(new UIMenuItem("F620")); spawnMenu.AddItem(new UIMenuItem("Faggio2")); spawnMenu.AddItem(new UIMenuItem("Fbi")); spawnMenu.AddItem(new UIMenuItem("Fbi2")); spawnMenu.AddItem(new UIMenuItem("Felon")); spawnMenu.AddItem(new UIMenuItem("Felon2")); spawnMenu.AddItem(new UIMenuItem("Feltzer2")); spawnMenu.AddItem(new UIMenuItem("Firetruk")); spawnMenu.AddItem(new UIMenuItem("Fixter")); spawnMenu.AddItem(new UIMenuItem("Flatbed")); spawnMenu.AddItem(new UIMenuItem("Forklift")); spawnMenu.AddItem(new UIMenuItem("Fq2")); spawnMenu.AddItem(new UIMenuItem("Frogger")); spawnMenu.AddItem(new UIMenuItem("Frogger2")); spawnMenu.AddItem(new UIMenuItem("Fugitive")); spawnMenu.AddItem(new UIMenuItem("Fusilade")); spawnMenu.AddItem(new UIMenuItem("Futo")); spawnMenu.AddItem(new UIMenuItem("Gauntlet")); spawnMenu.AddItem(new UIMenuItem("Gburrito")); spawnMenu.AddItem(new UIMenuItem("Granger")); spawnMenu.AddItem(new UIMenuItem("Gresley")); spawnMenu.AddItem(new UIMenuItem("Habanero")); spawnMenu.AddItem(new UIMenuItem("Handler")); spawnMenu.AddItem(new UIMenuItem("Hauler")); spawnMenu.AddItem(new UIMenuItem("Hexer")); spawnMenu.AddItem(new UIMenuItem("Hotknife")); spawnMenu.AddItem(new UIMenuItem("Infernus")); spawnMenu.AddItem(new UIMenuItem("Ingot")); spawnMenu.AddItem(new UIMenuItem("Intruder")); spawnMenu.AddItem(new UIMenuItem("Issi2")); spawnMenu.AddItem(new UIMenuItem("Jackal")); spawnMenu.AddItem(new UIMenuItem("Jb700")); spawnMenu.AddItem(new UIMenuItem("Jet")); spawnMenu.AddItem(new UIMenuItem("Jetmax")); spawnMenu.AddItem(new UIMenuItem("Journey")); spawnMenu.AddItem(new UIMenuItem("Khamelion")); spawnMenu.AddItem(new UIMenuItem("Ladstalker")); spawnMenu.AddItem(new UIMenuItem("Lazer")); spawnMenu.AddItem(new UIMenuItem("Lguard")); spawnMenu.AddItem(new UIMenuItem("Luxor")); spawnMenu.AddItem(new UIMenuItem("Mammatus")); spawnMenu.AddItem(new UIMenuItem("Manana")); spawnMenu.AddItem(new UIMenuItem("Marquis")); spawnMenu.AddItem(new UIMenuItem("Maverick")); spawnMenu.AddItem(new UIMenuItem("Mesa")); spawnMenu.AddItem(new UIMenuItem("Mesa2")); spawnMenu.AddItem(new UIMenuItem("Mesa3")); spawnMenu.AddItem(new UIMenuItem("Minivan")); spawnMenu.AddItem(new UIMenuItem("Mixer")); spawnMenu.AddItem(new UIMenuItem("Mixer2")); spawnMenu.AddItem(new UIMenuItem("Monroe")); spawnMenu.AddItem(new UIMenuItem("Mower")); spawnMenu.AddItem(new UIMenuItem("Mule")); spawnMenu.AddItem(new UIMenuItem("Mule2")); spawnMenu.AddItem(new UIMenuItem("Nemesis")); spawnMenu.AddItem(new UIMenuItem("Ninef")); spawnMenu.AddItem(new UIMenuItem("Ninef2")); spawnMenu.AddItem(new UIMenuItem("Oracle")); spawnMenu.AddItem(new UIMenuItem("Oracle2")); spawnMenu.AddItem(new UIMenuItem("Packer")); spawnMenu.AddItem(new UIMenuItem("Patriot")); spawnMenu.AddItem(new UIMenuItem("Pbus")); spawnMenu.AddItem(new UIMenuItem("Pcj")); spawnMenu.AddItem(new UIMenuItem("Penumbra")); spawnMenu.AddItem(new UIMenuItem("Peyote")); spawnMenu.AddItem(new UIMenuItem("Phantom")); spawnMenu.AddItem(new UIMenuItem("Phoenix")); spawnMenu.AddItem(new UIMenuItem("Picador")); spawnMenu.AddItem(new UIMenuItem("Police")); spawnMenu.AddItem(new UIMenuItem("Police2")); spawnMenu.AddItem(new UIMenuItem("Police3")); spawnMenu.AddItem(new UIMenuItem("Police4")); spawnMenu.AddItem(new UIMenuItem("Policeb")); spawnMenu.AddItem(new UIMenuItem("Policeold1")); spawnMenu.AddItem(new UIMenuItem("Policeold2")); spawnMenu.AddItem(new UIMenuItem("Policet")); spawnMenu.AddItem(new UIMenuItem("Polmav")); spawnMenu.AddItem(new UIMenuItem("Pony")); spawnMenu.AddItem(new UIMenuItem("Pony2")); spawnMenu.AddItem(new UIMenuItem("Pounder")); spawnMenu.AddItem(new UIMenuItem("Praire")); spawnMenu.AddItem(new UIMenuItem("Pranger")); spawnMenu.AddItem(new UIMenuItem("Predator")); spawnMenu.AddItem(new UIMenuItem("Premier")); spawnMenu.AddItem(new UIMenuItem("Primo")); spawnMenu.AddItem(new UIMenuItem("Radi")); spawnMenu.AddItem(new UIMenuItem("Rancherxl")); spawnMenu.AddItem(new UIMenuItem("Rancherxl2")); spawnMenu.AddItem(new UIMenuItem("Rapidgt")); spawnMenu.AddItem(new UIMenuItem("Rapidgt2")); spawnMenu.AddItem(new UIMenuItem("Ratloader")); spawnMenu.AddItem(new UIMenuItem("Rebel")); spawnMenu.AddItem(new UIMenuItem("Rebel2")); spawnMenu.AddItem(new UIMenuItem("Regina")); spawnMenu.AddItem(new UIMenuItem("Rentalbus")); spawnMenu.AddItem(new UIMenuItem("Rhino")); spawnMenu.AddItem(new UIMenuItem("Riot")); spawnMenu.AddItem(new UIMenuItem("Ripley")); spawnMenu.AddItem(new UIMenuItem("Rocoto")); spawnMenu.AddItem(new UIMenuItem("Romero")); spawnMenu.AddItem(new UIMenuItem("Rubble")); spawnMenu.AddItem(new UIMenuItem("Ruffian")); spawnMenu.AddItem(new UIMenuItem("Ruiner")); spawnMenu.AddItem(new UIMenuItem("Rumpo")); spawnMenu.AddItem(new UIMenuItem("Rumpo2")); spawnMenu.AddItem(new UIMenuItem("Sabregt")); spawnMenu.AddItem(new UIMenuItem("Sadler")); spawnMenu.AddItem(new UIMenuItem("Sadler2")); spawnMenu.AddItem(new UIMenuItem("Sanchez")); spawnMenu.AddItem(new UIMenuItem("Sanchez2")); spawnMenu.AddItem(new UIMenuItem("Sandking")); spawnMenu.AddItem(new UIMenuItem("Sandking2")); spawnMenu.AddItem(new UIMenuItem("Schafter2")); spawnMenu.AddItem(new UIMenuItem("Schwarzer")); spawnMenu.AddItem(new UIMenuItem("Scorcher")); spawnMenu.AddItem(new UIMenuItem("Scrap")); spawnMenu.AddItem(new UIMenuItem("Seashark")); spawnMenu.AddItem(new UIMenuItem("Seashark2")); spawnMenu.AddItem(new UIMenuItem("Seminole")); spawnMenu.AddItem(new UIMenuItem("Sentinel")); spawnMenu.AddItem(new UIMenuItem("Sentinel2")); spawnMenu.AddItem(new UIMenuItem("Serrano")); spawnMenu.AddItem(new UIMenuItem("Shamal")); spawnMenu.AddItem(new UIMenuItem("Sheriff")); spawnMenu.AddItem(new UIMenuItem("Sheriff2")); spawnMenu.AddItem(new UIMenuItem("Skylift")); spawnMenu.AddItem(new UIMenuItem("Speedo")); spawnMenu.AddItem(new UIMenuItem("Speedo2")); spawnMenu.AddItem(new UIMenuItem("Squalo")); spawnMenu.AddItem(new UIMenuItem("Stanier")); spawnMenu.AddItem(new UIMenuItem("Stinger")); spawnMenu.AddItem(new UIMenuItem("Stingergt")); spawnMenu.AddItem(new UIMenuItem("Stockade")); spawnMenu.AddItem(new UIMenuItem("Stockade3")); spawnMenu.AddItem(new UIMenuItem("Stratum")); spawnMenu.AddItem(new UIMenuItem("Stretch")); spawnMenu.AddItem(new UIMenuItem("Stunt")); spawnMenu.AddItem(new UIMenuItem("Submersible")); spawnMenu.AddItem(new UIMenuItem("Sultan")); spawnMenu.AddItem(new UIMenuItem("Suntrap")); spawnMenu.AddItem(new UIMenuItem("Superd")); spawnMenu.AddItem(new UIMenuItem("Surano")); spawnMenu.AddItem(new UIMenuItem("Surfer")); spawnMenu.AddItem(new UIMenuItem("Surfer2")); spawnMenu.AddItem(new UIMenuItem("Surge")); spawnMenu.AddItem(new UIMenuItem("Taco")); spawnMenu.AddItem(new UIMenuItem("Tailgater")); spawnMenu.AddItem(new UIMenuItem("Tankercar")); spawnMenu.AddItem(new UIMenuItem("Taxi")); spawnMenu.AddItem(new UIMenuItem("Tiptruck")); spawnMenu.AddItem(new UIMenuItem("Tiptruck2")); spawnMenu.AddItem(new UIMenuItem("Titan")); spawnMenu.AddItem(new UIMenuItem("Tornado")); spawnMenu.AddItem(new UIMenuItem("Tornado2")); spawnMenu.AddItem(new UIMenuItem("Tornado3")); spawnMenu.AddItem(new UIMenuItem("Tornado4")); spawnMenu.AddItem(new UIMenuItem("Tourbus")); spawnMenu.AddItem(new UIMenuItem("Towtruck")); spawnMenu.AddItem(new UIMenuItem("Towtruck2")); spawnMenu.AddItem(new UIMenuItem("Tractor")); spawnMenu.AddItem(new UIMenuItem("Tractor2")); spawnMenu.AddItem(new UIMenuItem("Tractor3")); spawnMenu.AddItem(new UIMenuItem("Trash")); spawnMenu.AddItem(new UIMenuItem("Tropic")); spawnMenu.AddItem(new UIMenuItem("Utilitruck")); spawnMenu.AddItem(new UIMenuItem("Utilitruck2")); spawnMenu.AddItem(new UIMenuItem("Utilitruck3")); spawnMenu.AddItem(new UIMenuItem("Vacca")); spawnMenu.AddItem(new UIMenuItem("Vader")); spawnMenu.AddItem(new UIMenuItem("Velum")); spawnMenu.AddItem(new UIMenuItem("Vigero")); spawnMenu.AddItem(new UIMenuItem("Voltic")); spawnMenu.AddItem(new UIMenuItem("Voodoo2")); spawnMenu.AddItem(new UIMenuItem("Washington")); spawnMenu.AddItem(new UIMenuItem("Youga")); spawnMenu.AddItem(new UIMenuItem("Zion")); spawnMenu.AddItem(new UIMenuItem("Zion2")); spawnMenu.AddItem(new UIMenuItem("Ztype")); spawnMenu.AddItem(new UIMenuItem("Bifta DLC Beach Bum")); spawnMenu.AddItem(new UIMenuItem("Kalahari DLC Beach Bum")); spawnMenu.AddItem(new UIMenuItem("Paradise DLC Beach Bum")); spawnMenu.AddItem(new UIMenuItem("Speeder DLC Beach Bum")); spawnMenu.AddItem(new UIMenuItem("Alpha DLC The Business")); spawnMenu.AddItem(new UIMenuItem("Jester DLC The Business")); spawnMenu.AddItem(new UIMenuItem("TurismoR DLC The Business")); spawnMenu.AddItem(new UIMenuItem("Vestra DLC The Business")); spawnMenu.AddItem(new UIMenuItem("Huntley DLC The High Life")); spawnMenu.AddItem(new UIMenuItem("Massacro DLC The High Life")); spawnMenu.AddItem(new UIMenuItem("Thrust DLC The High Life")); spawnMenu.AddItem(new UIMenuItem("Zentorno DLC The High Life")); spawnMenu.AddItem(new UIMenuItem("Blade DLC I'm Not a Hipster")); spawnMenu.AddItem(new UIMenuItem("Dubsta3 DLC I'm Not a Hipster")); spawnMenu.AddItem(new UIMenuItem("Glendale DLC I'm Not a Hipster")); spawnMenu.AddItem(new UIMenuItem("Panto DLC I'm Not a Hipster")); spawnMenu.AddItem(new UIMenuItem("Pigalle DLC I'm Not a Hipster")); spawnMenu.AddItem(new UIMenuItem("Rhapsody DLC I'm Not a Hipster")); spawnMenu.AddItem(new UIMenuItem("Warrener DLC I'm Not a Hipster")); spawnMenu.AddItem(new UIMenuItem("Monster DLC Indipendence Day")); spawnMenu.AddItem(new UIMenuItem("Sovereign DLC Indipendence Day")); spawnMenu.AddItem(new UIMenuItem("Furoregt DLC Last Team Standing")); spawnMenu.AddItem(new UIMenuItem("Hakuchou DLC Last Team Standing")); spawnMenu.AddItem(new UIMenuItem("Innovation DLC Last Team Standing")); spawnMenu.AddItem(new UIMenuItem("Besra DLC The San Andreas Flight School")); spawnMenu.AddItem(new UIMenuItem("Coquette2 DLC The San Andreas Flight School")); spawnMenu.AddItem(new UIMenuItem("Miljet DLC The San Andreas Flight School")); spawnMenu.AddItem(new UIMenuItem("Swift DLC The San Andreas Flight School")); spawnMenu.AddItem(new UIMenuItem("Btype DLC The Valentine Day Massacre")); spawnMenu.AddItem(new UIMenuItem("Blimp2")); spawnMenu.AddItem(new UIMenuItem("Blista2")); spawnMenu.AddItem(new UIMenuItem("Blista3")); spawnMenu.AddItem(new UIMenuItem("Buffalo3")); spawnMenu.AddItem(new UIMenuItem("Dodo")); spawnMenu.AddItem(new UIMenuItem("Dominator2")); spawnMenu.AddItem(new UIMenuItem("Dukes")); spawnMenu.AddItem(new UIMenuItem("Dukes2")); spawnMenu.AddItem(new UIMenuItem("Gauntlet2")); spawnMenu.AddItem(new UIMenuItem("Marshall")); spawnMenu.AddItem(new UIMenuItem("Stallion")); spawnMenu.AddItem(new UIMenuItem("Stallion2")); spawnMenu.AddItem(new UIMenuItem("Submersible2")); spawnMenu.AddItem(new UIMenuItem("Jester2 DLC Festive Surprise")); spawnMenu.AddItem(new UIMenuItem("Massacro2 DLC Festive Surprise")); spawnMenu.AddItem(new UIMenuItem("Ratloader2 DLC Festive Surprise")); spawnMenu.AddItem(new UIMenuItem("Slamvan DLC Festive Surprise")); spawnMenu.AddItem(new UIMenuItem("Btype2 DLC Halloween")); spawnMenu.AddItem(new UIMenuItem("Lurcher DLC Halloween")); spawnMenu.AddItem(new UIMenuItem("Barracks3 DLC Heists")); spawnMenu.AddItem(new UIMenuItem("Boxville4 DLC Heists")); spawnMenu.AddItem(new UIMenuItem("Casco DLC Heists")); spawnMenu.AddItem(new UIMenuItem("Dinghy3 DLC Heists")); spawnMenu.AddItem(new UIMenuItem("Enduro DLC Heists")); spawnMenu.AddItem(new UIMenuItem("Gburrito2 DLC Heists")); spawnMenu.AddItem(new UIMenuItem("Guardian DLC Heists")); spawnMenu.AddItem(new UIMenuItem("Hydra DLC Heists")); spawnMenu.AddItem(new UIMenuItem("Insurgent DLC Heists")); spawnMenu.AddItem(new UIMenuItem("Insurgent2 DLC Heists")); spawnMenu.AddItem(new UIMenuItem("Kuruma DLC Heists")); spawnMenu.AddItem(new UIMenuItem("Kuruma2 DLC Heists")); spawnMenu.AddItem(new UIMenuItem("Lectro DLC Heists")); spawnMenu.AddItem(new UIMenuItem("Mule3 DLC Heists")); spawnMenu.AddItem(new UIMenuItem("Savage DLC Heists")); spawnMenu.AddItem(new UIMenuItem("Slamvan2 DLC Heists")); spawnMenu.AddItem(new UIMenuItem("Technical DLC Heists")); spawnMenu.AddItem(new UIMenuItem("Trash2 DLC Heists")); spawnMenu.AddItem(new UIMenuItem("Valkyrie DLC Heists")); spawnMenu.AddItem(new UIMenuItem("Velum2 DLC Heists")); spawnMenu.AddItem(new UIMenuItem("Buccaner2 DLC Lowrider")); spawnMenu.AddItem(new UIMenuItem("Chino2 DLC Lowrider")); spawnMenu.AddItem(new UIMenuItem("Faction DLC Lowrider")); spawnMenu.AddItem(new UIMenuItem("Faction2 DLC Lowrider")); spawnMenu.AddItem(new UIMenuItem("Moonbeam DLC Lowrider")); spawnMenu.AddItem(new UIMenuItem("Moonbeam2 DLC Lowrider")); spawnMenu.AddItem(new UIMenuItem("Primo2 DLC Lowrider")); spawnMenu.AddItem(new UIMenuItem("Voodoo DLC Lowrider")); spawnMenu.AddItem(new UIMenuItem("Feltzer3 DLC Ill Gotten Gains Part 1")); spawnMenu.AddItem(new UIMenuItem("Luxor2 DLC Ill Gotten Gains Part 1")); spawnMenu.AddItem(new UIMenuItem("Osiris DLC Ill Gotten Gains Part 1")); spawnMenu.AddItem(new UIMenuItem("Swift2 DLC Ill Gotten Gains Part 1")); spawnMenu.AddItem(new UIMenuItem("Virgo DLC Ill Gotten Gains Part 1")); spawnMenu.AddItem(new UIMenuItem("Windsor DLC Ill Gotten Gains Part 1")); spawnMenu.AddItem(new UIMenuItem("Brawler DLC Ill Gotten Gains Part 2")); spawnMenu.AddItem(new UIMenuItem("Chino DLC Ill Gotten Gains Part 2")); spawnMenu.AddItem(new UIMenuItem("Coquette3 DLC Ill Gotten Gains Part 2")); spawnMenu.AddItem(new UIMenuItem("T20 DLC Ill Gotten Gains Part 2")); spawnMenu.AddItem(new UIMenuItem("Toro DLC Ill Gotten Gains Part 2")); spawnMenu.AddItem(new UIMenuItem("Vindicator DLC Ill Gotten Gains Part 2")); spawnMenu.OnItemSelect += OnItemSelect; spawnMenu.RefreshIndex(); #endregion mainMenu.BindMenuToItem(generalMenu, GOptions); mainMenu.BindMenuToItem(carMenu, COptions); mainMenu.BindMenuToItem(playerMenu, POptions); mainMenu.BindMenuToItem(timeMenu, TOptions); mainMenu.BindMenuToItem(weatherMenu, WeOptions); mainMenu.BindMenuToItem(weaponMenu, WOptions); mainMenu.BindMenuToItem(teleportMenu, TeOptions); mainMenu.BindMenuToItem(spawnMenu, SpawnOptions); }
public static void Add_Option_TurnLights(NativeUI.UIMenu Menu) { UIMenuCheckboxItem newMenu = new UIMenuCheckboxItem("Turn Lights", Helper.Globals.Settings.TurnLightsEnabled); newMenu.CheckboxEvent += Option_TurnLights_OnCheckboxChange; Menu.AddItem(newMenu); }
public static void Add_Option_Speedometer(NativeUI.UIMenu Menu) { UIMenuCheckboxItem newMenu = new UIMenuCheckboxItem("Speedometer", Helper.Globals.Settings.SpeedometerEnabled); newMenu.CheckboxEvent += Option_Speedometer_OnCheckboxChange; Menu.AddItem(newMenu); }
public static void Add_Option_HeadlightFlasher(NativeUI.UIMenu Menu) { UIMenuCheckboxItem newMenu = new UIMenuCheckboxItem("Headlight Flash on Horn", Helper.Globals.Settings.HeadlightFlasherEnabled); newMenu.CheckboxEvent += Option_HeadlightFlasher_OnCheckboxChange; Menu.AddItem(newMenu); }
public static void Add_Button_RecreateSettings(NativeUI.UIMenu Menu) { UIMenuItem newMenuItem = new UIMenuItem("Reset Settings", "Recreate the setting file (good after Updates)"); newMenuItem.Activated += Button_RecreateSettings_Activated; Menu.AddItem(newMenuItem); }
public static void Init() { if (!IsInit) { var res = UIMenu.GetScreenResolutionMantainRatio(); MainMenu = new UIMenu("", "~w~COURIER JOBS", new Point((int)(res.Width-200), 0)); IsInit = true; } }
/// <summary> /// Create and add a submenu to the menu pool. /// Adds an item with the given text to the menu, creates a corresponding submenu, and binds the submenu to the item. /// The submenu inherits its title from the menu, and its subtitle from the item text. /// </summary> /// <param name="menu">The parent menu to which the submenu must be added.</param> /// <param name="text">The name of the submenu.</param> /// <returns>The newly created submenu.</returns> public UIMenu AddSubMenu(UIMenu menu, string text) { var item = new UIMenuItem(text); menu.AddItem(item); var submenu = new UIMenu(menu.Title.Caption, text); this.Add(submenu); menu.BindMenuToItem(submenu, item); return submenu; }
private void Menu_OnItemSelect(NativeUI.UIMenu sender, NativeUI.UIMenuItem selectedItem, int index) { if (index == 0) { SaveVehicle(); } else { LoadVehicle(VehicleList.Vehicles[index - 1]); } }
public static void Add_Item_AboutMenu(NativeUI.UIMenu Menu) { UIMenuItem newMenu = new UIMenuItem("Info", "Mod Information"); Menu.AddItem(newMenu); Menu.OnItemSelect += delegate (UIMenu sender, UIMenuItem item, int index) { bool flag = item == newMenu; if (flag) { BigMessageThread.MessageInstance.ShowSimpleShard("Info", $"{Globals.PluginName}{Environment.NewLine}V. {Globals.AssemblyVersion}{Environment.NewLine}By Cubicon", 5000); } }; }
public virtual UIMenuItem addStartItem(ref UIMenu menu) { var startItem = new UIMenuItem("Démarrer la mission"); menu.AddItem(startItem); menu.OnItemSelect += (sender, item, index) => { if (item == startItem) { sender.Visible = false; } }; return startItem; }
internal static void InitMenu() { ModMenu = new UIMenu("Map Editor", "~b~" + Translation.Translate("EXTERNAL MODS")); ModMenu.DisableInstructionalButtons(true); ModMenu.OnItemSelect += (menu, item, index) => { var tmpMod = Mods[index]; if (CurrentMod == tmpMod) { UI.Notify("~b~~h~Map Editor~h~~n~~w~Mod ~h~" + tmpMod.Name + "~h~ " + Translation.Translate("has been disconnected.")); CurrentMod.ModDisconnectInvoker(); CurrentMod = null; } else { UI.Notify("~b~~h~Map Editor~h~~n~~w~Mod ~h~" + tmpMod.Name + "~h~ " + Translation.Translate("has been connected.")); tmpMod.ModSelectInvoker(); CurrentMod = tmpMod; } }; }
public UI() { menu = new UIMenu("Staz'z Screw Thingies", "Just some stupid things!"); pool = new MenuPool(); pool.Add(menu); delegates = new Dictionary <UIMenuItem, Delegate>(); AddButton("Kill Everyone", Actions.KILL_ALL); AddButton("Kill Everyone Repedatly", Actions.REPEATING_KILL_ALL); AddButton("Explode Everything", Actions.EXPLODE_ALL); AddButton("Explode Everything Repeatadly", Actions.REPEATING_EXPLOSION); AddButton("Make Self Invincible", Actions.PLAYER_INVINCIBLE); AddButton("Make Targated Invincible", Actions.TARGET_INVINCIBLE); AddButton("Remove All Entities", Actions.REMOVE_ENTITIES); AddButton("Spawn Car", Actions.SPAWN_CAR); AddButton("Teleport to Marker", Actions.TELEPORT_TO_MARKER); AddButton("Give All Weapons", Actions.GIVE_ALL_WEAPONS); AddButton("No Reload", Actions.NO_RELOAD); menu.OnItemSelect += OnClick; }
public GameMenu() { mainMenu = new UIMenu("Air Superiority", "BETA"); var menuItem = new UIMenuItem("~g~Start Script"); menuItem.Activated += (x, y) => { GameManager.InitializeScript(); menuPool.CloseAllMenus(); }; mainMenu.AddItem(menuItem); menuItem = new UIMenuItem("~r~Stop Script"); menuItem.Activated += (x, y) => GameManager.StopScript(); mainMenu.AddItem(menuItem); menuItem = new UIMenuItem("Unlocks (coming soon)"); menuItem.Enabled = false; mainMenu.AddItem(menuItem); menuItem = new UIMenuItem("View Stats"); mainMenu.AddItem(menuItem); statsMenu = new UIMenu("Player Stats", Game.Player.Name); menuItem = new UIMenuItem("Load Stats"); menuItem.Activated += (x, y) => LoadStatsMenu(); statsMenu.AddItem(menuItem); menuItem = new UIMenuItem("Player Kills: --"); menuItem.Enabled = false; statsMenu.AddItem(menuItem); menuItem = new UIMenuItem("Player Deaths: --"); menuItem.Enabled = false; statsMenu.AddItem(menuItem); menuItem = new UIMenuItem("Total Score: --"); menuItem.Enabled = false; statsMenu.AddItem(menuItem); mainMenu.BindMenuToItem(statsMenu, mainMenu.MenuItems[3]); mainMenu.OnItemSelect += MainMenu_OnItemSelect; mainMenu.RefreshIndex(); menuPool = new MenuPool(); menuPool.Add(mainMenu); menuPool.Add(statsMenu); KeyDown += KeyPressed; Tick += OnTick; }
internal virtual void ItemActivate(UIMenu sender) { Activated?.Invoke(sender, this); }
public CommunityRaces() { Tick += OnTick; int racesLoaded = LoadRaces(); _quitMenu = new UIMenu("", "~r~ARE YOU SURE YOU WANT TO QUIT?", new Point(0, -107)); var qitem = new UIMenuItem("Quit current race."); qitem.Activated += (item, index) => { if (_currentRace == null) return; _quitMenu.Visible = false; Game.FadeScreenOut(500); Wait(1000); Game.Player.Character.Position = _currentRace.Trigger; EndRace(); Game.FadeScreenIn(500); }; _quitMenu.AddItem(qitem); var citem = new UIMenuItem("Cancel."); citem.Activated += (item, index) => { _quitMenu.Visible = false; }; _quitMenu.AddItem(citem); _quitMenu.RefreshIndex(); _quitMenu.SetBannerType(new UIResRectangle()); foreach (Race race in _races) { var tmpBlip = World.CreateBlip(race.Trigger); tmpBlip.IsShortRange = true; tmpBlip.Sprite = BlipSprite.Race; } UI.Notify("~b~~h~Community Races~h~~n~~w~Loaded ~b~" + racesLoaded + "~w~ race(s)."); if (File.Exists("scripts\\MapEditor.dll")) AttachMapEditor(); }
private UIMenu route_menu() { rm = new UIMenu("", "GTAV BUS MOD"); menu_p.Add(rm); List<dynamic> route_names = _get_routes_name(); var start_but = new UIMenuItem("Start", "Click to start route."); rm.AddItem(start_but); var _routes_list = new UIMenuListItem("Routes List", route_names, 0, "Choose route"); rm.AddItem(_routes_list); var _cancel = new UIMenuItem("Cancel", "Cancel current route"); _cancel.Enabled = false; rm.AddItem(_cancel); if(__lock) { start_but.Enabled = false; _routes_list.Enabled = false; _cancel.Enabled = true; } rm.SetBannerType("scripts\\bus_mod.png"); rm.OnItemSelect += OnItemSelect; rm.OnListChange += OnListChange; rm.RefreshIndex(); return rm; }
//click start private void OnItemSelect(UIMenu sender, UIMenuItem selecteditem, int index) { if (sender == mi_menu) { switch (index) { case 0: _lock = true; menu_p.CloseAllMenus(); _mis.prepare_mission(mission); break; case 2: menu_p.CloseAllMenus(); _mis.cancel_mission(); _lock = false; break; } } if (sender == rm) { switch (index) { case 0: __lock = true; menu_p.CloseAllMenus(); _mr.prepare_route(route); break; case 2: __lock = false; menu_p.CloseAllMenus(); _mr.cancel_route(); break; } } }
private UIMenu main_menu() { main_m = new UIMenu("", "GTAV BUS MOD"); menu_p.Add(main_m); var mission_ = new UIMenuItem("Mission mod", "Click to start mission mod"); main_m.AddItem(mission_); var routes_ = new UIMenuItem("Routes mod", "Click to start routes mod"); main_m.AddItem(routes_); main_m.SetBannerType("scripts\\bus_mod.png"); main_m.Visible = !main_m.Visible; main_m.OnItemSelect += OnItemSelect; main_m.BindMenuToItem(mis_menu(), mission_); main_m.BindMenuToItem(route_menu(), routes_); main_m.RefreshIndex(); return main_m; }
/// <summary> /// Create and add a submenu to the menu pool with a custom offset. /// Adds an item with the given text to the menu, creates a corresponding submenu, and binds the submenu to the item. /// The submenu inherits its title from the menu, and its subtitle from the item text. /// </summary> /// <param name="menu">The parent menu to which the submenu must be added.</param> /// <param name="text">The name of the submenu</param> /// <param name="offset">The offset of the menu</param> /// <returns>The newly created submenu.</returns> public UIMenu AddSubMenu(UIMenu menu, string text, Point offset) { return(AddSubMenu(menu, text, "", offset)); }
public void SetParentMenu(UIMenu Menu) { ParentMenu = Menu; }
public void ProgressSelected(UIMenu Menu, UIMenuProgressItem Item, int index) { OnProgressSelected?.Invoke(Menu, Item, index); }
public virtual void fillMenu(ref UIMenu menu) { }
public MapEditor() { Tick += OnTick; KeyDown += OnKeyDown; if (!Directory.Exists("scripts\\MapEditor")) Directory.CreateDirectory("scripts\\MapEditor"); ObjectDatabase.SetupRelationships(); LoadSettings(); try { Translation.Load("scripts\\MapEditor", _settings.Translation); } catch (Exception e) { UI.Notify("~b~~h~Map Editor~h~~w~~n~Failed to load translations. Falling back to English."); UI.Notify(e.Message); } _scaleform = new Scaleform(0); _scaleform.Load("instructional_buttons"); _objectInfoMenu = new UIMenu("", "~b~" + Translation.Translate("PROPERTIES"), new Point(0, -107)); _objectInfoMenu.ResetKey(UIMenu.MenuControls.Back); _objectInfoMenu.DisableInstructionalButtons(true); _objectInfoMenu.SetBannerType(new UIResRectangle(new Point(), new Size())); _menuPool.Add(_objectInfoMenu); ModManager.InitMenu(); _objectsMenu = new UIMenu("Map Editor", "~b~" + Translation.Translate("PLACE OBJECT")); ObjectDatabase.LoadFromFile("scripts\\ObjectList.ini", ref ObjectDatabase.MainDb); ObjectDatabase.LoadInvalidHashes(); ObjectDatabase.LoadFromFile("scripts\\PedList.ini", ref ObjectDatabase.PedDb); ObjectDatabase.LoadFromFile("scripts\\VehicleList.ini", ref ObjectDatabase.VehicleDb); _crosshairPath = Path.GetFullPath("scripts\\MapEditor\\crosshair.png"); _crosshairBluePath = Path.GetFullPath("scripts\\MapEditor\\crosshair_blue.png"); _crosshairYellowPath = Path.GetFullPath("scripts\\MapEditor\\crosshair_yellow.png"); if (!File.Exists("scripts\\MapEditor\\crosshair.png")) _crosshairPath = Sprite.WriteFileFromResources(Assembly.GetExecutingAssembly(), "MapEditor.crosshair.png", "scripts\\MapEditor\\crosshair.png"); if (!File.Exists("scripts\\MapEditor\\crosshair_blue.png")) _crosshairBluePath = Sprite.WriteFileFromResources(Assembly.GetExecutingAssembly(), "MapEditor.crosshair_blue.png", "scripts\\MapEditor\\crosshair_blue.png"); if (!File.Exists("scripts\\MapEditor\\crosshair_yellow.png")) _crosshairYellowPath = Sprite.WriteFileFromResources(Assembly.GetExecutingAssembly(), "MapEditor.crosshair_yellow.png", "scripts\\MapEditor\\crosshair_yellow.png"); RedrawObjectsMenu(); _objectsMenu.OnItemSelect += OnObjectSelect; _objectsMenu.OnIndexChange += OnIndexChange; _menuPool.Add(_objectsMenu); _objectsMenu.ResetKey(UIMenu.MenuControls.Back); _objectsMenu.AddInstructionalButton(new InstructionalButton(Control.SelectWeapon, Translation.Translate("Change Axis"))); _objectsMenu.AddInstructionalButton(new InstructionalButton(Control.MoveUpDown, Translation.Translate("Zoom"))); _objectsMenu.AddInstructionalButton(new InstructionalButton(Control.Jump, Translation.Translate("Search"))); _searchMenu = new UIMenu("Map Editor", "~b~" + Translation.Translate("PLACE OBJECT")); _searchMenu.OnItemSelect += OnObjectSelect; _searchMenu.OnIndexChange += OnIndexChange; _menuPool.Add(_searchMenu); _searchMenu.ResetKey(UIMenu.MenuControls.Back); _searchMenu.AddInstructionalButton(new InstructionalButton(Control.SelectWeapon, Translation.Translate("Change Axis"))); _searchMenu.AddInstructionalButton(new InstructionalButton(Control.MoveUpDown, Translation.Translate("Zoom"))); _searchMenu.AddInstructionalButton(new InstructionalButton(Control.Jump, Translation.Translate("Search"))); _mainMenu = new UIMenu("Map Editor", "~b~" + Translation.Translate("MAIN MENU")); _mainMenu.AddItem(new UIMenuItem(Translation.Translate("Enter/Exit Map Editor"))); _mainMenu.AddItem(new UIMenuItem(Translation.Translate("New Map"), Translation.Translate("Remove all current objects and start a new map."))); _mainMenu.AddItem(new UIMenuItem(Translation.Translate("Save Map"), Translation.Translate("Save all current objects to a file."))); _mainMenu.AddItem(new UIMenuItem(Translation.Translate("Load Map"), Translation.Translate("Load objects from a file and add them to the world."))); _mainMenu.RefreshIndex(); _mainMenu.DisableInstructionalButtons(true); _menuPool.Add(_mainMenu); _formatMenu = new UIMenu("Map Editor", "~b~" + Translation.Translate("SELECT FORMAT")); _formatMenu.DisableInstructionalButtons(true); _formatMenu.ParentMenu = _mainMenu; RedrawFormatMenu(); _menuPool.Add(_formatMenu); _metadataMenu = new UIMenu("Map Editor", "~b~" + Translation.Translate("SAVE MAP")); _metadataMenu.DisableInstructionalButtons(true); _metadataMenu.ParentMenu = _formatMenu; RedrawMetadataMenu(); _menuPool.Add(_metadataMenu); _filepicker = new UIMenu("Map Editor", "~b~" + Translation.Translate("PICK FILE")); _filepicker.DisableInstructionalButtons(true); _filepicker.ParentMenu = _formatMenu; _menuPool.Add(_filepicker); _mainMenu.OnItemSelect += (m, it, i) => { switch (i) { case 0: // Enter/Exit Map Editor IsInFreecam = !IsInFreecam; Game.Player.Character.FreezePosition = IsInFreecam; Game.Player.Character.IsVisible = !IsInFreecam; World.RenderingCamera = null; if (!IsInFreecam) { Game.Player.Character.Position -= new Vector3(0f, 0f, Game.Player.Character.HeightAboveGround - 1f); return; } World.DestroyAllCameras(); _mainCamera = World.CreateCamera(GameplayCamera.Position, GameplayCamera.Rotation, 60f); _objectPreviewCamera = World.CreateCamera(new Vector3(1200.016f, 3980.998f, 86.05062f), new Vector3(0f, 0f, 0f), 60f); World.RenderingCamera = _mainCamera; break; case 1: // New Map JavascriptHook.StopAllScripts(); PropStreamer.RemoveAll(); PropStreamer.Markers.Clear(); _currentObjectsMenu.Clear(); PropStreamer.Identifications.Clear(); PropStreamer.ActiveScenarios.Clear(); PropStreamer.ActiveRelationships.Clear(); PropStreamer.ActiveWeapons.Clear(); PropStreamer.Doors.Clear(); PropStreamer.CurrentMapMetadata = new MapMetadata(); ModManager.CurrentMod?.ModDisconnectInvoker(); ModManager.CurrentMod = null; foreach (MapObject o in PropStreamer.RemovedObjects) { var t = World.CreateProp(o.Hash, o.Position, o.Rotation, true, false); t.PositionNoOffset = o.Position; } PropStreamer.RemovedObjects.Clear(); _loadedEntities = 0; _changesMade = 0; _lastAutosave = DateTime.Now; UI.Notify("~b~~h~Map Editor~h~~w~~n~" + Translation.Translate("Loaded new map.")); break; case 2: if (ModManager.CurrentMod != null) { string filename = Game.GetUserInput(255); if (String.IsNullOrWhiteSpace(filename)) { UI.Notify("~r~~h~Map Editor~h~~n~~w~" + Translation.Translate("The filename was empty.")); return; } Map tmpMap = new Map(); tmpMap.Objects.AddRange(PropStreamer.GetAllEntities()); tmpMap.RemoveFromWorld.AddRange(PropStreamer.RemovedObjects); tmpMap.Markers.AddRange(PropStreamer.Markers); UI.Notify("~b~~h~Map Editor~h~~n~~w~" + Translation.Translate("Map sent to external mod for saving.")); ModManager.CurrentMod.MapSavedInvoker(tmpMap, filename); return; } _savingMap = true; _mainMenu.Visible = false; RedrawFormatMenu(); _formatMenu.Visible = true; break; case 3: _savingMap = false; _mainMenu.Visible = false; RedrawFormatMenu(); _formatMenu.Visible = true; break; } }; _formatMenu.OnItemSelect += (m, item, indx) => { if (_savingMap) { string filename = ""; if (indx != 0) filename = Game.GetUserInput(255); switch (indx) { case 0: // XML // TODO: Send to another menu _formatMenu.Visible = false; RedrawMetadataMenu(); _metadataMenu.Visible = true; break; case 1: // Objects.ini if (!filename.EndsWith(".ini")) filename += ".ini"; SaveMap(filename, MapSerializer.Format.SimpleTrainer); break; case 2: // C# if (!filename.EndsWith(".cs")) filename += ".cs"; SaveMap(filename, MapSerializer.Format.CSharpCode); break; case 3: // Raw if (!filename.EndsWith(".txt")) filename += ".txt"; SaveMap(filename, MapSerializer.Format.Raw); break; case 4: // SpoonerLegacy if (!filename.EndsWith(".SP00N")) filename += ".SP00N"; SaveMap(filename, MapSerializer.Format.SpoonerLegacy); break; case 5: // Menyoo if (!filename.EndsWith(".xml")) filename += ".xml"; SaveMap(filename, MapSerializer.Format.Menyoo); break; } } else { string filename = ""; if (indx != 4) filename = Game.GetUserInput(255); MapSerializer.Format tmpFor = MapSerializer.Format.NormalXml; switch (indx) { case 0: // XML tmpFor = MapSerializer.Format.NormalXml; break; case 1: // Objects.ini tmpFor = MapSerializer.Format.SimpleTrainer; break; case 2: // Spooner tmpFor = MapSerializer.Format.SpoonerLegacy; break; case 3: // Spooner tmpFor = MapSerializer.Format.Menyoo; break; case 4: // File picker _formatMenu.Visible = false; RedrawFilepickerMenu(); _filepicker.Visible = true; return; } LoadMap(filename, tmpFor); } _formatMenu.Visible = false; }; _settingsMenu = new UIMenu("Map Editor", "~b~" + Translation.Translate("SETTINGS")); for (int i = -_possibleRange; i <= _possibleRange; i++) { _possiblePositions.Add(i * 0.01); } for (int i = -36000; i <= 36000; i++) { _possibleRoll.Add(i * 0.01); } var possibleLangauges = new List<string> { "Auto" }; possibleLangauges.AddRange(Translation.Translations.Select(t => t.Language).ToList()); var language = new UIMenuListItem(Translation.Translate("Language"), possibleLangauges.Select(t => (dynamic) t).ToList(), possibleLangauges.IndexOf(_settings.Translation)); language.OnListChanged += (sender, index) => { var newLanguage = sender.IndexToItem(index).ToString(); Translation.SetLanguage(newLanguage); _settings.Translation = newLanguage; SaveSettings(); if (newLanguage == "Auto") { language.Description = "Use your game's language settings."; return; } var descFile = Translation.Translations.FirstOrDefault(t => t.Language == newLanguage); if (descFile == null) return; language.Description = "~h~" + Translation.Translate("Translator") + ":~h~ " + descFile.Translator; }; var checkem = new UIMenuListItem(Translation.Translate("Marker"), new List<dynamic>(Enum.GetNames(typeof(CrosshairType))), Enum.GetNames(typeof(CrosshairType)).ToList().FindIndex(x => x == _settings.CrosshairType.ToString())); checkem.OnListChanged += (i, indx) => { CrosshairType outHash; Enum.TryParse(i.IndexToItem(indx).ToString(), out outHash); _settings.CrosshairType = outHash; SaveSettings(); }; List<dynamic> autosaveList = new List<dynamic> {Translation.Translate("Disable")}; for (int i = 5; i <= 60; i += 5) { autosaveList.Add(i); } int aIndex = autosaveList.IndexOf(_settings.AutosaveInterval); if (aIndex == -1) aIndex = 0; var autosaveItem = new UIMenuListItem(Translation.Translate("Autosave Interval"), autosaveList, aIndex, Translation.Translate("Interval in minutes between automatic autosaves.")); autosaveItem.OnListChanged += (item, index) => { var sel = item.IndexToItem(index); _settings.AutosaveInterval = (sel as string) == Translation.Translate("Disable") ? -1 : Convert.ToInt32(item.IndexToItem(index), CultureInfo.InvariantCulture); SaveSettings(); }; List<dynamic> possibleDrawDistances = new List<dynamic> {Translation.Translate("Default"), 50, 75}; for (int i = 100; i <= 3000; i += 100) { possibleDrawDistances.Add(i); } int dIndex = possibleDrawDistances.IndexOf(_settings.DrawDistance); if (dIndex == -1) dIndex = 0; var drawDistanceItem = new UIMenuListItem(Translation.Translate("Draw Distance"), possibleDrawDistances, dIndex, Translation.Translate("Draw distance for props, vehicles and peds. Reload the map for changes to take effect.")); drawDistanceItem.OnListChanged += (item, index) => { var sel = item.IndexToItem(index); _settings.DrawDistance = (sel as string) == Translation.Translate("Default") ? -1 : Convert.ToInt32(item.IndexToItem(index), CultureInfo.InvariantCulture); SaveSettings(); }; List<dynamic> senslist = new List<dynamic>(); for (int i = 1; i < 60; i++) { senslist.Add(i); } var gamboy = new UIMenuListItem(Translation.Translate("Mouse Camera Sensitivity"), senslist, _settings.CameraSensivity - 1); gamboy.OnListChanged += (item, index) => { _settings.CameraSensivity = index + 1; SaveSettings(); }; var gampadSens = new UIMenuListItem(Translation.Translate("Gamepad Camera Sensitivity"), senslist, _settings.GamepadCameraSensitivity - 1); gampadSens.OnListChanged += (item, index) => { _settings.GamepadCameraSensitivity = index + 1; SaveSettings(); }; var keymovesens = new UIMenuListItem(Translation.Translate("Keyboard Movement Sensitivity"), senslist, _settings.KeyboardMovementSensitivity - 1); keymovesens.OnListChanged += (item, index) => { _settings.KeyboardMovementSensitivity = index + 1; SaveSettings(); }; var gammovesens = new UIMenuListItem(Translation.Translate("Gamepad Movement Sensitivity"), senslist, _settings.GamepadMovementSensitivity - 1); gammovesens.OnListChanged += (item, index) => { _settings.GamepadMovementSensitivity = index + 1; SaveSettings(); }; var butts = new UIMenuCheckboxItem(Translation.Translate("Instructional Buttons"), _settings.InstructionalButtons); butts.CheckboxEvent += (i, checkd) => { _settings.InstructionalButtons = checkd; SaveSettings(); }; var gamepadItem = new UIMenuCheckboxItem(Translation.Translate("Enable Gamepad Shortcut"), _settings.Gamepad); gamepadItem.CheckboxEvent += (i, checkd) => { _settings.Gamepad = checkd; SaveSettings(); }; var counterItem = new UIMenuCheckboxItem(Translation.Translate("Entity Counter"), _settings.PropCounterDisplay); counterItem.CheckboxEvent += (i, checkd) => { _settings.PropCounterDisplay = checkd; SaveSettings(); }; var snapper = new UIMenuCheckboxItem(Translation.Translate("Follow Object With Camera"), _settings.SnapCameraToSelectedObject); snapper.CheckboxEvent += (i, checkd) => { _settings.SnapCameraToSelectedObject = checkd; SaveSettings(); }; var boundItem = new UIMenuCheckboxItem(Translation.Translate("Bounding Box"), _settings.BoundingBox.GetValueOrDefault(false)); boundItem.CheckboxEvent += (i, checkd) => { _settings.BoundingBox = checkd; SaveSettings(); }; var scriptItem = new UIMenuCheckboxItem(Translation.Translate("Execute Scripts"), _settings.LoadScripts); scriptItem.CheckboxEvent += (i, checkd) => { _settings.LoadScripts = checkd; SaveSettings(); }; var validate = new UIMenuItem(Translation.Translate("Validate Object Database"),Translation.Translate( "This will update the current object database, removing any invalid objects. The changes will take effect after you restart the script." + " It will take a couple of minutes.")); validate.Activated += (men, item) => ValidateDatabase(); var resetGrps = new UIMenuItem(Translation.Translate("Reset Active Relationship Groups"), Translation.Translate("This will set all ped's relationship groups to Companion.")); resetGrps.Activated += (men, item) => { PropStreamer.Peds.ForEach(ped => ObjectDatabase.SetPedRelationshipGroup(new Ped(ped), "Companion")); }; var objectValidationItem = new UIMenuCheckboxItem(Translation.Translate("Skip Invalid Objects"), _settings.OmitInvalidObjects); objectValidationItem.CheckboxEvent += (i, checkd) => { _settings.OmitInvalidObjects = checkd; SaveSettings(); }; #if DEBUG var testItem = new UIMenuItem("Load Terrain"); testItem.Activated += (sender, item) => { if (!Game.IsWaypointActive) { Function.Call(Hash.CLEAR_HD_AREA); return; } var wpyPos = World.GetWaypointPosition(); Function.Call(Hash.SET_HD_AREA, wpyPos.X, wpyPos.Y, wpyPos.Z, 400f); }; _settingsMenu.AddItem(testItem); #endif _settingsMenu.AddItem(language); _settingsMenu.AddItem(gamepadItem); _settingsMenu.AddItem(drawDistanceItem); _settingsMenu.AddItem(autosaveItem); _settingsMenu.AddItem(checkem); _settingsMenu.AddItem(boundItem); _settingsMenu.AddItem(gamboy); _settingsMenu.AddItem(gampadSens); _settingsMenu.AddItem(keymovesens); _settingsMenu.AddItem(gammovesens); _settingsMenu.AddItem(butts); _settingsMenu.AddItem(counterItem); _settingsMenu.AddItem(snapper); _settingsMenu.AddItem(scriptItem); _settingsMenu.AddItem(objectValidationItem); _settingsMenu.AddItem(validate); _settingsMenu.AddItem(resetGrps); _settingsMenu.RefreshIndex(); _settingsMenu.DisableInstructionalButtons(true); _menuPool.Add(_settingsMenu); _currentObjectsMenu = new UIMenu("Map Editor", "~b~" + Translation.Translate("CURRENT ENTITES")); _currentObjectsMenu.OnItemSelect += OnEntityTeleport; _currentObjectsMenu.DisableInstructionalButtons(true); _menuPool.Add(_currentObjectsMenu); var binder = new UIMenuItem(Translation.Translate("Settings")); _currentEntitiesItem = new UIMenuItem(Translation.Translate("Current Entities")); var binder2 = new UIMenuItem(Translation.Translate("Create Map for External Mod")); _mainMenu.AddItem(_currentEntitiesItem); _mainMenu.AddItem(binder); _mainMenu.AddItem(binder2); _mainMenu.BindMenuToItem(_settingsMenu, binder); _mainMenu.BindMenuToItem(_currentObjectsMenu, _currentEntitiesItem); _mainMenu.BindMenuToItem(ModManager.ModMenu, binder2); _mainMenu.RefreshIndex(); _menuPool.Add(ModManager.ModMenu); }
private void CreateMenu() { _mainMenu = new UIMenu("Tobii Eye Tracking", "~b~SETTINGS"); _mainMenu.SetMenuWidthOffset(50); //_mainMenu.ControlDisablingEnabled = false; _menuPool.Add(_mainMenu); var values0To1 = new List<dynamic>(); for (var i = 0; i <= 10; i++) { values0To1.Add(i * 0.1); } var valuesMinus1To1 = new List<dynamic>(); for (var i = -10; i <= 10; i++) { valuesMinus1To1.Add(i * 0.1); } var values0To70 = new List<dynamic>(); for (var i = 0; i <= 70; i++) { values0To70.Add((double)i); } var valuesMinus70To0 = new List<dynamic>(); for (var i = -70; i <= 0; i++) { valuesMinus70To0.Add((double)i); } var freelookDevices = new List<dynamic> { "Gamepad", "Mouse" }; _freelookDevice = new UIMenuListItem("Freelook device", freelookDevices, (int)_settings.FreelookDevice, "Device to use for freelook"); _freelookDevice.OnListChanged += (sender, args) => { _settings.FreelookDevice = (FeeelookDevice)_freelookDevice.Index; }; _mainMenu.AddItem(_freelookDevice); var thirdPersonFreelook = new UIMenuCheckboxItem("TPS Freelook", _settings.ThirdPersonFreelookEnabled, "Control camera with gaze"); thirdPersonFreelook.CheckboxEvent += (sender, args) => { _settings.ThirdPersonFreelookEnabled = thirdPersonFreelook.Checked; }; _mainMenu.AddItem(thirdPersonFreelook); var thirdPersonSensitivitySlider = new UIMenuListItem("TPS Freelook Sensitivity", values0To1, (int)Math.Round(_settings.ThirdPersonSensitivity / 0.1), "Freelook sensitivity"); thirdPersonSensitivitySlider.OnListChanged += (sender, args) => { _settings.ThirdPersonSensitivity = thirdPersonSensitivitySlider.IndexToItem(thirdPersonSensitivitySlider.Index); }; _mainMenu.AddItem(thirdPersonSensitivitySlider); { var thirdPersonYOffsetSlider = new UIMenuListItem("TPS Freelook Vertical Offset", valuesMinus1To1, (int)Math.Round((_settings.ThirdPersonYOffset + 1) / 0.1), "Freelook vertical offset"); thirdPersonYOffsetSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonYOffset = thirdPersonYOffsetSlider.IndexToItem(thirdPersonYOffsetSlider.Index); }; _mainMenu.AddItem(thirdPersonYOffsetSlider); var thirdPersonDeadZoneWidthSlider = new UIMenuListItem("TPS Freelook Deadzone Width", values0To1, (int)Math.Round(_settings.ThirdPersonDeadZoneWidth / 0.1), "Freelook deadzone"); thirdPersonDeadZoneWidthSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonDeadZoneWidth = thirdPersonDeadZoneWidthSlider.IndexToItem(thirdPersonDeadZoneWidthSlider.Index); }; _mainMenu.AddItem(thirdPersonDeadZoneWidthSlider); var thirdPersonDeadZoneHeightSlider = new UIMenuListItem("TPS Freelook Deadzone Height", values0To1, (int)Math.Round(_settings.ThirdPersonDeadZoneHeight / 0.1), "Freelook deadzone"); thirdPersonDeadZoneHeightSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonDeadZoneHeight = thirdPersonDeadZoneHeightSlider.IndexToItem(thirdPersonDeadZoneHeightSlider.Index); }; _mainMenu.AddItem(thirdPersonDeadZoneHeightSlider); var thirdPersonMinPitchSlider = new UIMenuListItem("TPS Min Pitch", valuesMinus70To0, (int)Math.Round((_settings.ThirdPersonMinPitchDeg + 70) / 1), "Freelook min pitch angle"); thirdPersonMinPitchSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonMinPitchDeg = thirdPersonMinPitchSlider.IndexToItem(thirdPersonMinPitchSlider.Index); }; _mainMenu.AddItem(thirdPersonMinPitchSlider); var thirdPersonMaxPitchSlider = new UIMenuListItem("TPS Max Pitch", values0To70, (int)Math.Round((_settings.ThirdPersonMaxPitchDeg) / 1), "Freelook max pitch angle"); thirdPersonMaxPitchSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonMaxPitchDeg = thirdPersonMaxPitchSlider.IndexToItem(thirdPersonMaxPitchSlider.Index); }; _mainMenu.AddItem(thirdPersonMaxPitchSlider); } { var thirdPersonYOffsetDrivingSlider = new UIMenuListItem("TPS Freelook Vertical Offset Driving", valuesMinus1To1, (int)Math.Round((_settings.ThirdPersonYOffsetDriving + 1) / 0.1), "Freelook vertical offset"); thirdPersonYOffsetDrivingSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonYOffsetDriving = thirdPersonYOffsetDrivingSlider.IndexToItem(thirdPersonYOffsetDrivingSlider.Index); }; _mainMenu.AddItem(thirdPersonYOffsetDrivingSlider); var thirdPersonDeadZoneWidthDrivingSlider = new UIMenuListItem("TPS Freelook Deadzone Width Driving", values0To1, (int)Math.Round(_settings.ThirdPersonDeadZoneWidthDriving / 0.1), "Freelook deadzone"); thirdPersonDeadZoneWidthDrivingSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonDeadZoneWidthDriving = thirdPersonDeadZoneWidthDrivingSlider.IndexToItem(thirdPersonDeadZoneWidthDrivingSlider.Index); }; _mainMenu.AddItem(thirdPersonDeadZoneWidthDrivingSlider); var thirdPersonDeadZoneHeightDrivingSlider = new UIMenuListItem("TPS Freelook Deadzone Height Driving", values0To1, (int)Math.Round(_settings.ThirdPersonDeadZoneHeightDriving / 0.1), "Freelook deadzone"); thirdPersonDeadZoneHeightDrivingSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonDeadZoneHeightDriving = thirdPersonDeadZoneHeightDrivingSlider.IndexToItem(thirdPersonDeadZoneHeightDrivingSlider.Index); }; _mainMenu.AddItem(thirdPersonDeadZoneHeightDrivingSlider); var thirdPersonMinPitchDrivingSlider = new UIMenuListItem("TPS Min Pitch Driving", valuesMinus70To0, (int)Math.Round((_settings.ThirdPersonMinPitchDrivingDeg + 70) / 1), "Freelook min pitch angle"); thirdPersonMinPitchDrivingSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonMinPitchDrivingDeg = thirdPersonMinPitchDrivingSlider.IndexToItem(thirdPersonMinPitchDrivingSlider.Index); }; _mainMenu.AddItem(thirdPersonMinPitchDrivingSlider); var thirdPersonMaxPitchDrivingSlider = new UIMenuListItem("TPS Max Pitch Driving", values0To70, (int)Math.Round((_settings.ThirdPersonMaxPitchDeg) / 1), "Freelook max pitch angle"); thirdPersonMaxPitchDrivingSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonMaxPitchDrivingDeg = thirdPersonMaxPitchDrivingSlider.IndexToItem(thirdPersonMaxPitchDrivingSlider.Index); }; _mainMenu.AddItem(thirdPersonMaxPitchDrivingSlider); } { var thirdPersonYOffsetPlaneSlider = new UIMenuListItem("TPS Freelook Vertical Offset Plane", valuesMinus1To1, (int)Math.Round((_settings.ThirdPersonYOffsetPlane + 1) / 0.1), "Freelook vertical offset"); thirdPersonYOffsetPlaneSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonYOffsetPlane = thirdPersonYOffsetPlaneSlider.IndexToItem(thirdPersonYOffsetPlaneSlider.Index); }; _mainMenu.AddItem(thirdPersonYOffsetPlaneSlider); var thirdPersonDeadZoneWidthPlaneSlider = new UIMenuListItem("TPS Freelook Deadzone Width Plane", values0To1, (int)Math.Round(_settings.ThirdPersonDeadZoneWidthPlane / 0.1), "Freelook deadzone"); thirdPersonDeadZoneWidthPlaneSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonDeadZoneWidthPlane = thirdPersonDeadZoneWidthPlaneSlider.IndexToItem(thirdPersonDeadZoneWidthPlaneSlider.Index); }; _mainMenu.AddItem(thirdPersonDeadZoneWidthPlaneSlider); var thirdPersonDeadZoneHeightPlaneSlider = new UIMenuListItem("TPS Freelook Deadzone Height Plane", values0To1, (int)Math.Round(_settings.ThirdPersonDeadZoneHeightPlane / 0.1), "Freelook deadzone"); thirdPersonDeadZoneHeightPlaneSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonDeadZoneHeightPlane = thirdPersonDeadZoneHeightPlaneSlider.IndexToItem(thirdPersonDeadZoneHeightPlaneSlider.Index); }; _mainMenu.AddItem(thirdPersonDeadZoneHeightPlaneSlider); var thirdPersonMinPitchPlaneSlider = new UIMenuListItem("TPS Min Pitch Plane", valuesMinus70To0, (int)Math.Round((_settings.ThirdPersonMinPitchPlaneDeg + 70) / 1), "Freelook min pitch angle"); thirdPersonMinPitchPlaneSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonMinPitchPlaneDeg = thirdPersonMinPitchPlaneSlider.IndexToItem(thirdPersonMinPitchPlaneSlider.Index); }; _mainMenu.AddItem(thirdPersonMinPitchPlaneSlider); var thirdPersonMaxPitchPlaneSlider = new UIMenuListItem("TPS Max Pitch Plane", values0To70, (int)Math.Round((_settings.ThirdPersonMaxPitchPlaneDeg) / 1), "Freelook max pitch angle"); thirdPersonMaxPitchPlaneSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonMaxPitchPlaneDeg = thirdPersonMaxPitchPlaneSlider.IndexToItem(thirdPersonMaxPitchPlaneSlider.Index); }; _mainMenu.AddItem(thirdPersonMaxPitchPlaneSlider); } { var thirdPersonYOffsetHeliSlider = new UIMenuListItem("TPS Freelook Vertical Offset Heli", valuesMinus1To1, (int)Math.Round((_settings.ThirdPersonYOffsetHeli + 1) / 0.1), "Freelook vertical offset"); thirdPersonYOffsetHeliSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonYOffsetHeli = thirdPersonYOffsetHeliSlider.IndexToItem(thirdPersonYOffsetHeliSlider.Index); }; _mainMenu.AddItem(thirdPersonYOffsetHeliSlider); var thirdPersonDeadZoneWidthHeliSlider = new UIMenuListItem("TPS Freelook Deadzone Width Heli", values0To1, (int)Math.Round(_settings.ThirdPersonDeadZoneWidthHeli / 0.1), "Freelook deadzone"); thirdPersonDeadZoneWidthHeliSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonDeadZoneWidthHeli = thirdPersonDeadZoneWidthHeliSlider.IndexToItem(thirdPersonDeadZoneWidthHeliSlider.Index); }; _mainMenu.AddItem(thirdPersonDeadZoneWidthHeliSlider); var thirdPersonDeadZoneHeightHeliSlider = new UIMenuListItem("TPS Freelook Deadzone Height Heli", values0To1, (int)Math.Round(_settings.ThirdPersonDeadZoneHeightHeli / 0.1), "Freelook deadzone"); thirdPersonDeadZoneHeightHeliSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonDeadZoneHeightHeli = thirdPersonDeadZoneHeightHeliSlider.IndexToItem(thirdPersonDeadZoneHeightHeliSlider.Index); }; _mainMenu.AddItem(thirdPersonDeadZoneHeightHeliSlider); var thirdPersonMinPitchHeliSlider = new UIMenuListItem("TPS Min Pitch Heli", valuesMinus70To0, (int)Math.Round((_settings.ThirdPersonMinPitchHeliDeg + 70) / 1), "Freelook min pitch angle"); thirdPersonMinPitchHeliSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonMinPitchHeliDeg = thirdPersonMinPitchHeliSlider.IndexToItem(thirdPersonMinPitchHeliSlider.Index); }; _mainMenu.AddItem(thirdPersonMinPitchHeliSlider); var thirdPersonMaxPitchHeliSlider = new UIMenuListItem("TPS Max Pitch Heli", values0To70, (int)Math.Round((_settings.ThirdPersonMaxPitchDeg) / 1), "Freelook max pitch angle"); thirdPersonMaxPitchHeliSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonMaxPitchHeliDeg = thirdPersonMaxPitchHeliSlider.IndexToItem(thirdPersonMaxPitchHeliSlider.Index); }; _mainMenu.AddItem(thirdPersonMaxPitchHeliSlider); } var firstPersonFreelook = new UIMenuCheckboxItem("FPS Freelook", _settings.FirstPersonFreelookEnabled, "Control camera with gaze"); firstPersonFreelook.CheckboxEvent += (sender, args) => { _settings.FirstPersonFreelookEnabled = firstPersonFreelook.Checked; }; _mainMenu.AddItem(firstPersonFreelook); var firstPersonSensitivitySlider = new UIMenuListItem("FPS Freelook Sensitivity", values0To1, (int)Math.Round(_settings.FirstPersonSensitivity / 0.1), "Freelook sensitivity"); firstPersonSensitivitySlider.OnListChanged += (sender, args) => { _settings.FirstPersonSensitivity = firstPersonSensitivitySlider.IndexToItem(firstPersonSensitivitySlider.Index); }; _mainMenu.AddItem(firstPersonSensitivitySlider); { var firstPersonDeadZoneWidthSlider = new UIMenuListItem("FPS Freelook Deadzone Width", values0To1, (int)Math.Round(_settings.FirstPersonDeadZoneWidth / 0.1), "Freelook deadzone"); firstPersonDeadZoneWidthSlider.OnListChanged += (sender, args) => { _settings.FirstPersonDeadZoneWidth = firstPersonDeadZoneWidthSlider.IndexToItem(firstPersonDeadZoneWidthSlider.Index); }; _mainMenu.AddItem(firstPersonDeadZoneWidthSlider); var firstPersonDeadZoneHeightSlider = new UIMenuListItem("FPS Freelook Deadzone Height", values0To1, (int)Math.Round(_settings.FirstPersonDeadZoneHeight / 0.1), "Freelook deadzone"); firstPersonDeadZoneHeightSlider.OnListChanged += (sender, args) => { _settings.FirstPersonDeadZoneHeight = firstPersonDeadZoneHeightSlider.IndexToItem(firstPersonDeadZoneHeightSlider.Index); }; _mainMenu.AddItem(firstPersonDeadZoneHeightSlider); var firstPersonMinPitchSlider = new UIMenuListItem("FPS Min Pitch", valuesMinus70To0, (int)Math.Round((_settings.FirstPersonMinPitchDeg + 70) / 1), "Freelook min pitch angle"); firstPersonMinPitchSlider.OnListChanged += (sender, args) => { _settings.FirstPersonMinPitchDeg = firstPersonMinPitchSlider.IndexToItem(firstPersonMinPitchSlider.Index); }; _mainMenu.AddItem(firstPersonMinPitchSlider); var firstPersonMaxPitchSlider = new UIMenuListItem("FPS Max Pitch", values0To70, (int)Math.Round((_settings.FirstPersonMaxPitchDeg) / 1), "Freelook max pitch angle"); firstPersonMaxPitchSlider.OnListChanged += (sender, args) => { _settings.FirstPersonMaxPitchDeg = firstPersonMaxPitchSlider.IndexToItem(firstPersonMaxPitchSlider.Index); }; _mainMenu.AddItem(firstPersonMaxPitchSlider); } var aimingSensitivitySlider = new UIMenuListItem("Aiming Sensitivity", values0To1, (int)Math.Round(_settings.AimingSensitivity / 0.1), "Freelok sensitivity while aiming"); aimingSensitivitySlider.OnListChanged += (sender, args) => { _settings.AimingSensitivity = aimingSensitivitySlider.IndexToItem(aimingSensitivitySlider.Index); }; _mainMenu.AddItem(aimingSensitivitySlider); var aimWithGaze = new UIMenuCheckboxItem("Aim With Gaze", _settings.AimWithGazeEnabled, "Aim with gaze"); aimWithGaze.CheckboxEvent += (sender, args) => { _settings.AimWithGazeEnabled = aimWithGaze.Checked; }; _mainMenu.AddItem(aimWithGaze); var snapAtPedestrians = new UIMenuCheckboxItem("Snap At Pedestrians", _settings.SnapAtPedestriansEnabled, "Snap aim at pedestrians"); snapAtPedestrians.CheckboxEvent += (sender, args) => { _settings.SnapAtPedestriansEnabled = snapAtPedestrians.Checked; }; _mainMenu.AddItem(snapAtPedestrians); var gazeFilteringSlider = new UIMenuListItem("Gaze Filter", values0To1, (int)Math.Round(_settings.GazeFiltering / 0.1), "Filter gaze data"); gazeFilteringSlider.OnListChanged += (sender, args) => { _settings.GazeFiltering = gazeFilteringSlider.IndexToItem(gazeFilteringSlider.Index); }; _mainMenu.AddItem(gazeFilteringSlider); var incinerateAtGaze = new UIMenuCheckboxItem("Incinerate At Gaze", _settings.IncinerateAtGazeEnabled, "Incinerate at gaze"); incinerateAtGaze.CheckboxEvent += (sender, args) => { _settings.IncinerateAtGazeEnabled = incinerateAtGaze.Checked; }; _mainMenu.AddItem(incinerateAtGaze); var taseAtGaze = new UIMenuCheckboxItem("Tase At Gaze", _settings.TaseAtGazeEnabled, "Tase at gaze"); taseAtGaze.CheckboxEvent += (sender, args) => { _settings.TaseAtGazeEnabled = taseAtGaze.Checked; }; _mainMenu.AddItem(taseAtGaze); var missilesAtGaze = new UIMenuCheckboxItem("Launch Missiles At Gaze", _settings.MissilesAtGazeEnabled, "Launch missiles at gaze"); missilesAtGaze.CheckboxEvent += (sender, args) => { _settings.MissilesAtGazeEnabled = missilesAtGaze.Checked; }; _mainMenu.AddItem(missilesAtGaze); var pedestrianIntreraction = new UIMenuCheckboxItem("Pedestrian Interaction", _settings.PedestrianInteractionEnabled, "Pedestrians talk to you"); pedestrianIntreraction.CheckboxEvent += (sender, args) => { _settings.PedestrianInteractionEnabled = pedestrianIntreraction.Checked; }; _mainMenu.AddItem(pedestrianIntreraction); var dontFallFromBikes = new UIMenuCheckboxItem("Don't Fall From Bikes", _settings.DontFallFromBikesEnabled, "Never fall from bikes"); dontFallFromBikes.CheckboxEvent += (sender, args) => { _settings.DontFallFromBikesEnabled = dontFallFromBikes.Checked; }; _mainMenu.AddItem(dontFallFromBikes); var dedzns = new UIMenuItem("Deadzones"); _mainMenu.AddItem(dedzns); _mainMenu.RefreshIndex(); { DeadzoneMenu = new UIMenu("Tobii Eye Tracking", "~b~DEADZONES"); DeadzoneMenu.SetMenuWidthOffset(50); _mainMenu.BindMenuToItem(DeadzoneMenu, dedzns); DeadzoneMenu.AddItem(new UIMenuItem("Add Deadzone", "Deadzones prevent camera movement when you are looking inside the zone, for example, the minimap.")); DeadzoneMenu.RefreshIndex(); _menuPool.Add(DeadzoneMenu); } }
private void CreateMenu() { _mainMenu = new UIMenu("Tobii Eye Tracking", "~b~SETTINGS"); _mainMenu.SetMenuWidthOffset(50); //_mainMenu.ControlDisablingEnabled = false; _menuPool.Add(_mainMenu); InitLists(); CreateThirdPersonFreelookMenu(); CreateFirstPersonFreelookMenu(); CreateDeadzoneMenu(); _freelookDevice = new UIMenuListItem("Freelook Device", _freelookDevices, (int)_settings.FreelookDevice, "Device to use for freelook"); _freelookDevice.OnListChanged += (sender, args) => { _settings.FreelookDevice = (FeeelookDevice)_freelookDevice.Index; }; _mainMenu.AddItem(_freelookDevice); var firstPersonFreelookSettings = new UIMenuItem("First Person Freelook Settings", "Look around with gaze in first person"); _mainMenu.AddItem(firstPersonFreelookSettings); _mainMenu.BindMenuToItem(FirstPersonFreelookMenu, firstPersonFreelookSettings); var thirdPersonFreelookSettings = new UIMenuItem("Third Person Freelook Settings", "Look around with gaze in third person"); _mainMenu.AddItem(thirdPersonFreelookSettings); _mainMenu.BindMenuToItem(ThirdPersonFreelookMenu, thirdPersonFreelookSettings); var deadzoneSettings = new UIMenuItem("Freelook Deadzones", "Deadzones prevent camera movement when you are looking inside the zone, for example, the minimap"); _mainMenu.AddItem(deadzoneSettings); _mainMenu.BindMenuToItem(DeadzoneMenu, deadzoneSettings); var aimingSensitivitySlider = new UIMenuListItem("Aiming Sensitivity", _values0To1, (int)Math.Round(_settings.AimingSensitivity / 0.1), "Freelok sensitivity while aiming"); aimingSensitivitySlider.OnListChanged += (sender, args) => { _settings.AimingSensitivity = aimingSensitivitySlider.IndexToItem(aimingSensitivitySlider.Index); }; _mainMenu.AddItem(aimingSensitivitySlider); var aimWithGaze = new UIMenuCheckboxItem("Aim With Gaze", _settings.AimWithGazeEnabled, "Aim with gaze"); aimWithGaze.CheckboxEvent += (sender, args) => { _settings.AimWithGazeEnabled = aimWithGaze.Checked; }; _mainMenu.AddItem(aimWithGaze); var snapAtPedestrians = new UIMenuCheckboxItem("Snap At Pedestrians", _settings.SnapAtPedestriansEnabled, "Snap aim at pedestrians"); snapAtPedestrians.CheckboxEvent += (sender, args) => { _settings.SnapAtPedestriansEnabled = snapAtPedestrians.Checked; }; _mainMenu.AddItem(snapAtPedestrians); var gazeFilteringSlider = new UIMenuListItem("Gaze Filter", _values0To1, (int)Math.Round(_settings.GazeFiltering / 0.1), "Filter gaze data"); gazeFilteringSlider.OnListChanged += (sender, args) => { _settings.GazeFiltering = gazeFilteringSlider.IndexToItem(gazeFilteringSlider.Index); }; _mainMenu.AddItem(gazeFilteringSlider); var incinerateAtGaze = new UIMenuCheckboxItem("Incinerate At Gaze", _settings.IncinerateAtGazeEnabled, "Incinerate at gaze"); incinerateAtGaze.CheckboxEvent += (sender, args) => { _settings.IncinerateAtGazeEnabled = incinerateAtGaze.Checked; }; _mainMenu.AddItem(incinerateAtGaze); var taseAtGaze = new UIMenuCheckboxItem("Tase At Gaze", _settings.TaseAtGazeEnabled, "Tase at gaze"); taseAtGaze.CheckboxEvent += (sender, args) => { _settings.TaseAtGazeEnabled = taseAtGaze.Checked; }; _mainMenu.AddItem(taseAtGaze); var missilesAtGaze = new UIMenuCheckboxItem("Launch Missiles At Gaze", _settings.MissilesAtGazeEnabled, "Launch missiles at gaze"); missilesAtGaze.CheckboxEvent += (sender, args) => { _settings.MissilesAtGazeEnabled = missilesAtGaze.Checked; }; _mainMenu.AddItem(missilesAtGaze); var pedestrianIntreraction = new UIMenuCheckboxItem("Pedestrian Interaction", _settings.PedestrianInteractionEnabled, "Pedestrians talk to you"); pedestrianIntreraction.CheckboxEvent += (sender, args) => { _settings.PedestrianInteractionEnabled = pedestrianIntreraction.Checked; }; _mainMenu.AddItem(pedestrianIntreraction); var dontFallFromBikes = new UIMenuCheckboxItem("Don't Fall From Bikes", _settings.DontFallFromBikesEnabled, "Never fall from bikes"); dontFallFromBikes.CheckboxEvent += (sender, args) => { _settings.DontFallFromBikesEnabled = dontFallFromBikes.Checked; }; _mainMenu.AddItem(dontFallFromBikes); var shutDown = new UIMenuItem("Shut Down", "Unload the mod"); shutDown.Activated += (sender, item) => { ShutDownRequested(this, new EventArgs()); }; _mainMenu.AddItem(shutDown); _mainMenu.RefreshIndex(); }
private void CreateThirdPersonFreelookMenu() { ThirdPersonFreelookMenu = new UIMenu("Tobii Eye Tracking", "~b~THIRD PERSON FREELOOK SETTINGS"); ThirdPersonFreelookMenu.SetMenuWidthOffset(50); { var thirdPersonFreelook = new UIMenuCheckboxItem("TPS Freelook", _settings.ThirdPersonFreelookEnabled, "Control camera with gaze"); thirdPersonFreelook.CheckboxEvent += (sender, args) => { _settings.ThirdPersonFreelookEnabled = thirdPersonFreelook.Checked; }; ThirdPersonFreelookMenu.AddItem(thirdPersonFreelook); var thirdPersonSensitivitySlider = new UIMenuListItem("TPS Freelook Sensitivity", _values0To1, (int) Math.Round(_settings.ThirdPersonSensitivity/0.1), "Freelook sensitivity"); thirdPersonSensitivitySlider.OnListChanged += (sender, args) => { _settings.ThirdPersonSensitivity = thirdPersonSensitivitySlider.IndexToItem(thirdPersonSensitivitySlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonSensitivitySlider); var thirdPersonYOffsetSlider = new UIMenuListItem("TPS Freelook Vertical Offset", _valuesMinus1To1, (int) Math.Round((_settings.ThirdPersonYOffset + 1)/0.1), "Freelook vertical offset"); thirdPersonYOffsetSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonYOffset = thirdPersonYOffsetSlider.IndexToItem(thirdPersonYOffsetSlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonYOffsetSlider); var thirdPersonDeadZoneWidthSlider = new UIMenuListItem("TPS Freelook Deadzone Width", _values0To1, (int) Math.Round(_settings.ThirdPersonDeadZoneWidth/0.1), "Freelook deadzone"); thirdPersonDeadZoneWidthSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonDeadZoneWidth = thirdPersonDeadZoneWidthSlider.IndexToItem(thirdPersonDeadZoneWidthSlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonDeadZoneWidthSlider); var thirdPersonDeadZoneHeightSlider = new UIMenuListItem("TPS Freelook Deadzone Height", _values0To1, (int) Math.Round(_settings.ThirdPersonDeadZoneHeight/0.1), "Freelook deadzone"); thirdPersonDeadZoneHeightSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonDeadZoneHeight = thirdPersonDeadZoneHeightSlider.IndexToItem(thirdPersonDeadZoneHeightSlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonDeadZoneHeightSlider); var thirdPersonMinPitchSlider = new UIMenuListItem("TPS Min Pitch", _valuesMinus70To0, (int) Math.Round((_settings.ThirdPersonMinPitchDeg + 70)/1), "Freelook min pitch angle"); thirdPersonMinPitchSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonMinPitchDeg = thirdPersonMinPitchSlider.IndexToItem(thirdPersonMinPitchSlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonMinPitchSlider); var thirdPersonMaxPitchSlider = new UIMenuListItem("TPS Max Pitch", _values0To70, (int) Math.Round((_settings.ThirdPersonMaxPitchDeg)/1), "Freelook max pitch angle"); thirdPersonMaxPitchSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonMaxPitchDeg = thirdPersonMaxPitchSlider.IndexToItem(thirdPersonMaxPitchSlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonMaxPitchSlider); } { var thirdPersonYOffsetDrivingSlider = new UIMenuListItem("TPS Freelook Vertical Offset Driving", _valuesMinus1To1, (int) Math.Round((_settings.ThirdPersonYOffsetDriving + 1)/0.1), "Freelook vertical offset"); thirdPersonYOffsetDrivingSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonYOffsetDriving = thirdPersonYOffsetDrivingSlider.IndexToItem(thirdPersonYOffsetDrivingSlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonYOffsetDrivingSlider); var thirdPersonDeadZoneWidthDrivingSlider = new UIMenuListItem("TPS Freelook Deadzone Width Driving", _values0To1, (int) Math.Round(_settings.ThirdPersonDeadZoneWidthDriving/0.1), "Freelook deadzone"); thirdPersonDeadZoneWidthDrivingSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonDeadZoneWidthDriving = thirdPersonDeadZoneWidthDrivingSlider.IndexToItem(thirdPersonDeadZoneWidthDrivingSlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonDeadZoneWidthDrivingSlider); var thirdPersonDeadZoneHeightDrivingSlider = new UIMenuListItem("TPS Freelook Deadzone Height Driving", _values0To1, (int) Math.Round(_settings.ThirdPersonDeadZoneHeightDriving/0.1), "Freelook deadzone"); thirdPersonDeadZoneHeightDrivingSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonDeadZoneHeightDriving = thirdPersonDeadZoneHeightDrivingSlider.IndexToItem(thirdPersonDeadZoneHeightDrivingSlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonDeadZoneHeightDrivingSlider); var thirdPersonMinPitchDrivingSlider = new UIMenuListItem("TPS Min Pitch Driving", _valuesMinus70To0, (int) Math.Round((_settings.ThirdPersonMinPitchDrivingDeg + 70)/1), "Freelook min pitch angle"); thirdPersonMinPitchDrivingSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonMinPitchDrivingDeg = thirdPersonMinPitchDrivingSlider.IndexToItem(thirdPersonMinPitchDrivingSlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonMinPitchDrivingSlider); var thirdPersonMaxPitchDrivingSlider = new UIMenuListItem("TPS Max Pitch Driving", _values0To70, (int) Math.Round((_settings.ThirdPersonMaxPitchDeg)/1), "Freelook max pitch angle"); thirdPersonMaxPitchDrivingSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonMaxPitchDrivingDeg = thirdPersonMaxPitchDrivingSlider.IndexToItem(thirdPersonMaxPitchDrivingSlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonMaxPitchDrivingSlider); } { var thirdPersonYOffsetPlaneSlider = new UIMenuListItem("TPS Freelook Vertical Offset Plane", _valuesMinus1To1, (int) Math.Round((_settings.ThirdPersonYOffsetPlane + 1)/0.1), "Freelook vertical offset"); thirdPersonYOffsetPlaneSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonYOffsetPlane = thirdPersonYOffsetPlaneSlider.IndexToItem(thirdPersonYOffsetPlaneSlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonYOffsetPlaneSlider); var thirdPersonDeadZoneWidthPlaneSlider = new UIMenuListItem("TPS Freelook Deadzone Width Plane", _values0To1, (int) Math.Round(_settings.ThirdPersonDeadZoneWidthPlane/0.1), "Freelook deadzone"); thirdPersonDeadZoneWidthPlaneSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonDeadZoneWidthPlane = thirdPersonDeadZoneWidthPlaneSlider.IndexToItem(thirdPersonDeadZoneWidthPlaneSlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonDeadZoneWidthPlaneSlider); var thirdPersonDeadZoneHeightPlaneSlider = new UIMenuListItem("TPS Freelook Deadzone Height Plane", _values0To1, (int) Math.Round(_settings.ThirdPersonDeadZoneHeightPlane/0.1), "Freelook deadzone"); thirdPersonDeadZoneHeightPlaneSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonDeadZoneHeightPlane = thirdPersonDeadZoneHeightPlaneSlider.IndexToItem(thirdPersonDeadZoneHeightPlaneSlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonDeadZoneHeightPlaneSlider); var thirdPersonMinPitchPlaneSlider = new UIMenuListItem("TPS Min Pitch Plane", _valuesMinus70To0, (int) Math.Round((_settings.ThirdPersonMinPitchPlaneDeg + 70)/1), "Freelook min pitch angle"); thirdPersonMinPitchPlaneSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonMinPitchPlaneDeg = thirdPersonMinPitchPlaneSlider.IndexToItem(thirdPersonMinPitchPlaneSlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonMinPitchPlaneSlider); var thirdPersonMaxPitchPlaneSlider = new UIMenuListItem("TPS Max Pitch Plane", _values0To70, (int) Math.Round((_settings.ThirdPersonMaxPitchPlaneDeg)/1), "Freelook max pitch angle"); thirdPersonMaxPitchPlaneSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonMaxPitchPlaneDeg = thirdPersonMaxPitchPlaneSlider.IndexToItem(thirdPersonMaxPitchPlaneSlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonMaxPitchPlaneSlider); } { var thirdPersonYOffsetHeliSlider = new UIMenuListItem("TPS Freelook Vertical Offset Heli", _valuesMinus1To1, (int) Math.Round((_settings.ThirdPersonYOffsetHeli + 1)/0.1), "Freelook vertical offset"); thirdPersonYOffsetHeliSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonYOffsetHeli = thirdPersonYOffsetHeliSlider.IndexToItem(thirdPersonYOffsetHeliSlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonYOffsetHeliSlider); var thirdPersonDeadZoneWidthHeliSlider = new UIMenuListItem("TPS Freelook Deadzone Width Heli", _values0To1, (int) Math.Round(_settings.ThirdPersonDeadZoneWidthHeli/0.1), "Freelook deadzone"); thirdPersonDeadZoneWidthHeliSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonDeadZoneWidthHeli = thirdPersonDeadZoneWidthHeliSlider.IndexToItem(thirdPersonDeadZoneWidthHeliSlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonDeadZoneWidthHeliSlider); var thirdPersonDeadZoneHeightHeliSlider = new UIMenuListItem("TPS Freelook Deadzone Height Heli", _values0To1, (int) Math.Round(_settings.ThirdPersonDeadZoneHeightHeli/0.1), "Freelook deadzone"); thirdPersonDeadZoneHeightHeliSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonDeadZoneHeightHeli = thirdPersonDeadZoneHeightHeliSlider.IndexToItem(thirdPersonDeadZoneHeightHeliSlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonDeadZoneHeightHeliSlider); var thirdPersonMinPitchHeliSlider = new UIMenuListItem("TPS Min Pitch Heli", _valuesMinus70To0, (int) Math.Round((_settings.ThirdPersonMinPitchHeliDeg + 70)/1), "Freelook min pitch angle"); thirdPersonMinPitchHeliSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonMinPitchHeliDeg = thirdPersonMinPitchHeliSlider.IndexToItem(thirdPersonMinPitchHeliSlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonMinPitchHeliSlider); var thirdPersonMaxPitchHeliSlider = new UIMenuListItem("TPS Max Pitch Heli", _values0To70, (int) Math.Round((_settings.ThirdPersonMaxPitchDeg)/1), "Freelook max pitch angle"); thirdPersonMaxPitchHeliSlider.OnListChanged += (sender, args) => { _settings.ThirdPersonMaxPitchHeliDeg = thirdPersonMaxPitchHeliSlider.IndexToItem(thirdPersonMaxPitchHeliSlider.Index); }; ThirdPersonFreelookMenu.AddItem(thirdPersonMaxPitchHeliSlider); } ThirdPersonFreelookMenu.RefreshIndex(); _menuPool.Add(ThirdPersonFreelookMenu); }
/// <summary> /// Bind a menu to a button. When the button is clicked that menu will open. /// </summary> public void BindMenuToItem(UIMenu menuToBind, UIMenuItem itemToBindTo) { menuToBind.ParentMenu = this; menuToBind.ParentItem = itemToBindTo; if (Children.ContainsKey(itemToBindTo)) Children[itemToBindTo] = menuToBind; else Children.Add(itemToBindTo, menuToBind); }
private void CreateFirstPersonFreelookMenu() { FirstPersonFreelookMenu = new UIMenu("Tobii Eye Tracking", "~b~FIRST PERSON FREELOOK SETTINGS"); FirstPersonFreelookMenu.SetMenuWidthOffset(50); { var firstPersonFreelook = new UIMenuCheckboxItem("FPS Freelook", _settings.FirstPersonFreelookEnabled, "Control camera with gaze"); firstPersonFreelook.CheckboxEvent += (sender, args) => { _settings.FirstPersonFreelookEnabled = firstPersonFreelook.Checked; }; FirstPersonFreelookMenu.AddItem(firstPersonFreelook); var firstPersonSensitivitySlider = new UIMenuListItem("FPS Freelook Sensitivity", _values0To1, (int) Math.Round(_settings.FirstPersonSensitivity/0.1), "Freelook sensitivity"); firstPersonSensitivitySlider.OnListChanged += (sender, args) => { _settings.FirstPersonSensitivity = firstPersonSensitivitySlider.IndexToItem(firstPersonSensitivitySlider.Index); }; FirstPersonFreelookMenu.AddItem(firstPersonSensitivitySlider); var firstPersonDeadZoneWidthSlider = new UIMenuListItem("FPS Freelook Deadzone Width", _values0To1, (int) Math.Round(_settings.FirstPersonDeadZoneWidth/0.1), "Freelook deadzone"); firstPersonDeadZoneWidthSlider.OnListChanged += (sender, args) => { _settings.FirstPersonDeadZoneWidth = firstPersonDeadZoneWidthSlider.IndexToItem(firstPersonDeadZoneWidthSlider.Index); }; FirstPersonFreelookMenu.AddItem(firstPersonDeadZoneWidthSlider); var firstPersonDeadZoneHeightSlider = new UIMenuListItem("FPS Freelook Deadzone Height", _values0To1, (int) Math.Round(_settings.FirstPersonDeadZoneHeight/0.1), "Freelook deadzone"); firstPersonDeadZoneHeightSlider.OnListChanged += (sender, args) => { _settings.FirstPersonDeadZoneHeight = firstPersonDeadZoneHeightSlider.IndexToItem(firstPersonDeadZoneHeightSlider.Index); }; FirstPersonFreelookMenu.AddItem(firstPersonDeadZoneHeightSlider); var firstPersonMinPitchSlider = new UIMenuListItem("FPS Min Pitch", _valuesMinus70To0, (int) Math.Round((_settings.FirstPersonMinPitchDeg + 70)/1), "Freelook min pitch angle"); firstPersonMinPitchSlider.OnListChanged += (sender, args) => { _settings.FirstPersonMinPitchDeg = firstPersonMinPitchSlider.IndexToItem(firstPersonMinPitchSlider.Index); }; FirstPersonFreelookMenu.AddItem(firstPersonMinPitchSlider); var firstPersonMaxPitchSlider = new UIMenuListItem("FPS Max Pitch", _values0To70, (int) Math.Round((_settings.FirstPersonMaxPitchDeg)/1), "Freelook max pitch angle"); firstPersonMaxPitchSlider.OnListChanged += (sender, args) => { _settings.FirstPersonMaxPitchDeg = firstPersonMaxPitchSlider.IndexToItem(firstPersonMaxPitchSlider.Index); }; FirstPersonFreelookMenu.AddItem(firstPersonMaxPitchSlider); } { var firstPersonFreelookDriving = new UIMenuCheckboxItem("FPS Freelook Driving", _settings.FirstPersonFreelookDrivingEnabled, "Control camera with gaze"); firstPersonFreelookDriving.CheckboxEvent += (sender, args) => { _settings.FirstPersonFreelookDrivingEnabled = firstPersonFreelookDriving.Checked; }; FirstPersonFreelookMenu.AddItem(firstPersonFreelookDriving); var firstPersonSensitivityDrivingSlider = new UIMenuListItem("FPS Freelook Sensitivity Driving", _values0To1, (int) Math.Round(_settings.FirstPersonSensitivityDriving/0.1), "Freelook sensitivity"); firstPersonSensitivityDrivingSlider.OnListChanged += (sender, args) => { _settings.FirstPersonSensitivityDriving = firstPersonSensitivityDrivingSlider.IndexToItem(firstPersonSensitivityDrivingSlider.Index); }; FirstPersonFreelookMenu.AddItem(firstPersonSensitivityDrivingSlider); var firstPersonDeadZoneWidthDrivingSlider = new UIMenuListItem("FPS Freelook Deadzone Width Driving", _values0To1, (int) Math.Round(_settings.FirstPersonDeadZoneWidthDriving/0.1), "Freelook deadzone"); firstPersonDeadZoneWidthDrivingSlider.OnListChanged += (sender, args) => { _settings.FirstPersonDeadZoneWidthDriving = firstPersonDeadZoneWidthDrivingSlider.IndexToItem(firstPersonDeadZoneWidthDrivingSlider.Index); }; FirstPersonFreelookMenu.AddItem(firstPersonDeadZoneWidthDrivingSlider); var firstPersonDeadZoneHeightDrivingSlider = new UIMenuListItem("FPS Freelook Deadzone Height Driving", _values0To1, (int) Math.Round(_settings.FirstPersonDeadZoneHeightDriving/0.1), "Freelook deadzone"); firstPersonDeadZoneHeightDrivingSlider.OnListChanged += (sender, args) => { _settings.FirstPersonDeadZoneHeightDriving = firstPersonDeadZoneHeightDrivingSlider.IndexToItem(firstPersonDeadZoneHeightDrivingSlider.Index); }; FirstPersonFreelookMenu.AddItem(firstPersonDeadZoneHeightDrivingSlider); var firstPersonMinPitchDrivingSlider = new UIMenuListItem("FPS Min Pitch Driving", _valuesMinus70To0, (int) Math.Round((_settings.FirstPersonMinPitchDegDriving + 70)/1), "Freelook min pitch angle"); firstPersonMinPitchDrivingSlider.OnListChanged += (sender, args) => { _settings.FirstPersonMinPitchDegDriving = firstPersonMinPitchDrivingSlider.IndexToItem(firstPersonMinPitchDrivingSlider.Index); }; FirstPersonFreelookMenu.AddItem(firstPersonMinPitchDrivingSlider); var firstPersonMaxPitchDrivingSlider = new UIMenuListItem("FPS Max Pitch Driving", _values0To70, (int) Math.Round((_settings.FirstPersonMaxPitchDegDriving)/1), "Freelook max pitch angle"); firstPersonMaxPitchDrivingSlider.OnListChanged += (sender, args) => { _settings.FirstPersonMaxPitchDegDriving = firstPersonMaxPitchDrivingSlider.IndexToItem(firstPersonMaxPitchDrivingSlider.Index); }; FirstPersonFreelookMenu.AddItem(firstPersonMaxPitchDrivingSlider); } FirstPersonFreelookMenu.RefreshIndex(); _menuPool.Add(FirstPersonFreelookMenu); }
private void OnListChange(UIMenu sender, UIMenuListItem listItem, int newIndex) { #region SenderPlayer if (sender == playerMenu) { Game.Player.WantedLevel = listItem.Index; } #endregion #region SenderVehicle if (sender == carMenu) { if (listItem == CarColors) { Vehicle veh = Game.Player.Character.CurrentVehicle; if (listItem.Index == 0) { ChangeColor(VehicleColor.MetallicRed); } if (listItem.Index == 1) { ChangeColor(VehicleColor.MetallicBlue); } if (listItem.Index == 2) { ChangeColor(VehicleColor.MetallicBlack); } if (listItem.Index == 3) { ChangeColor(VehicleColor.MetallicGreen); } if (listItem.Index == 4) { ChangeColor(VehicleColor.MetallicWhite); } if (listItem.Index == 5) { ChangeColor(VehicleColor.MetallicRaceYellow); } } } #endregion #region SenderTime if (sender == timeMenu) { if (listItem == DOH) { if (listItem.Index == 0) Function.Call(Hash.SET_CLOCK_DATE, 1, World.CurrentDate.Month, World.CurrentDate.Year); if (listItem.Index == 1) Function.Call(Hash.SET_CLOCK_DATE, 2, World.CurrentDate.Month, World.CurrentDate.Year); if (listItem.Index == 2) Function.Call(Hash.SET_CLOCK_DATE, 3, World.CurrentDate.Month, World.CurrentDate.Year); if (listItem.Index == 3) Function.Call(Hash.SET_CLOCK_DATE, 4, World.CurrentDate.Month, World.CurrentDate.Year); if (listItem.Index == 4) Function.Call(Hash.SET_CLOCK_DATE, 5, World.CurrentDate.Month, World.CurrentDate.Year); if (listItem.Index == 5) Function.Call(Hash.SET_CLOCK_DATE, 6, World.CurrentDate.Month, World.CurrentDate.Year); if (listItem.Index == 6) Function.Call(Hash.SET_CLOCK_DATE, 7, World.CurrentDate.Month, World.CurrentDate.Year); } } #endregion #region SenderTeleport if (sender == teleportMenu) { if (listItem == Spaceship) { if (listItem.Index == 0) Game.Player.Character.Position = new Vector3(428.9633f, 6468.706f, 28.7793f); if (listItem.Index == 1) Game.Player.Character.Position = new Vector3(-377.6008f, 6085.317f, 39.6054f); if (listItem.Index == 2) Game.Player.Character.Position = new Vector3(-511.4319f, 5665.392f, 47.18425f); if (listItem.Index == 3) Game.Player.Character.Position = new Vector3(2196.858f, 5605.221f, 53.46579f); if (listItem.Index == 4) Game.Player.Character.Position = new Vector3(-1440.44f, 5408.934f, 24.91879f); if (listItem.Index == 5) Game.Player.Character.Position = new Vector3(2426.09f, 4781.363f, 34.53447f); if (listItem.Index == 6) Game.Player.Character.Position = new Vector3(-1949.748f, 4579.819f, 48.60158f); if (listItem.Index == 7) Game.Player.Character.Position = new Vector3(3830.587f, 4444.813f, 2.741449f); if (listItem.Index == 8) Game.Player.Character.Position = new Vector3(-523.1528f, 4437.72f, 31.19645f); if (listItem.Index == 9) Game.Player.Character.Position = new Vector3(1493.419f, 3841.722f, 25.35632f); if (listItem.Index == 10) Game.Player.Character.Position = new Vector3(2515.396f, 3783.656f, 53.00525f); if (listItem.Index == 11) Game.Player.Character.Position = new Vector3(-584.2244f, 3583.952f, 268.1571f); if (listItem.Index == 12) Game.Player.Character.Position = new Vector3(1923.4f, 3466.915f, 51.53664f); if (listItem.Index == 13) Game.Player.Character.Position = new Vector3(77.28337f, 3278.656f, 31.13165f); if (listItem.Index == 14) Game.Player.Character.Position = new Vector3(-387.5963f, 2956.099f, 20.28623f); if (listItem.Index == 15) Game.Player.Character.Position = new Vector3(1964.487f, 2919.821f, 57.10085f); if (listItem.Index == 16) Game.Player.Character.Position = new Vector3(891.7535f, 2861.718f, 56.29594f); if (listItem.Index == 17) Game.Player.Character.Position = new Vector3(171.3739f, 2214.534f, 90.55803f); if (listItem.Index == 18) Game.Player.Character.Position = new Vector3(3132.028f, 2205.297f, -5.922436f); if (listItem.Index == 19) Game.Player.Character.Position = new Vector3(1371.199f, 2186.829f, 97.91506f); if (listItem.Index == 20) Game.Player.Character.Position = new Vector3(-1443.997f, 2136.469f, 30.47571f); if (listItem.Index == 21) Game.Player.Character.Position = new Vector3(-1939.431f, 1953.672f, 156.9697f); if (listItem.Index == 22) Game.Player.Character.Position = new Vector3(796.1694f, 1841.498f, 123.736f); if (listItem.Index == 23) Game.Player.Character.Position = new Vector3(-2807.29f, 1451.316f, 100.8354f); if (listItem.Index == 24) Game.Player.Character.Position = new Vector3(-1903.989f, 1388.988f, 218.8167f); if (listItem.Index == 25) Game.Player.Character.Position = new Vector3(-411.1031f, 1100.412f, 332.5343f); if (listItem.Index == 26) Game.Player.Character.Position = new Vector3(-1533.125f, 869.5099f, 181.8977f); if (listItem.Index == 27) Game.Player.Character.Position = new Vector3(85.95246f, 812.373f, 214.2908f); if (listItem.Index == 28) Game.Player.Character.Position = new Vector3(2908.929f, 804.3307f, 2.923146f); if (listItem.Index == 29) Game.Player.Character.Position = new Vector3(22.86215f, 639.6559f, 190.6649f); if (listItem.Index == 30) Game.Player.Character.Position = new Vector3(1965.278f, 551.0641f, 161.405f); if (listItem.Index == 31) Game.Player.Character.Position = new Vector3(1683.04f, 36.84582f, 156.6593f); if (listItem.Index == 32) Game.Player.Character.Position = new Vector3(-1175.974f, -63.66705f, 45.80711f); if (listItem.Index == 33) Game.Player.Character.Position = new Vector3(-416.1761f, -139.9122f, 64.41656f); if (listItem.Index == 34) Game.Player.Character.Position = new Vector3(-233.4292f, -244.759f, 49.90495f); if (listItem.Index == 35) Game.Player.Character.Position = new Vector3(-1182.393f, -521.6902f, 40.84121f); if (listItem.Index == 36) Game.Player.Character.Position = new Vector3(161.4487f, -560.5097f, 21.99138f); if (listItem.Index == 37) Game.Player.Character.Position = new Vector3(195.8474f, -566.9279f, 129.09f); if (listItem.Index == 38) Game.Player.Character.Position = new Vector3(465.8565f, -730.8796f, 27.36073f); if (listItem.Index == 39) Game.Player.Character.Position = new Vector3(1236.186f, -1105.222f, 35.68897f); if (listItem.Index == 40) Game.Player.Character.Position = new Vector3(-901.9235f, -1162.494f, 32.74917f); if (listItem.Index == 41) Game.Player.Character.Position = new Vector3(14.27985f, -1214.412f, 29.35767f); if (listItem.Index == 42) Game.Player.Character.Position = new Vector3(293.9202f, -1447.16f, 46.50953f); if (listItem.Index == 43) Game.Player.Character.Position = new Vector3(1742.733f, -1626.818f, 112.4214f); if (listItem.Index == 44) Game.Player.Character.Position = new Vector3(375.8281f, -2118.732f, 16.63311f); if (listItem.Index == 45) Game.Player.Character.Position = new Vector3(1134.959f, -2612.322f, 15.01656f); if (listItem.Index == 46) Game.Player.Character.Position = new Vector3(338.3029f, -2776.947f, 43.63181f); if (listItem.Index == 47) Game.Player.Character.Position = new Vector3(1590.83f, -2808.073f, 4.886177f); if (listItem.Index == 48) Game.Player.Character.Position = new Vector3(640.5842f, -3234.545f, -6.723347f); if (listItem.Index == 49) Game.Player.Character.Position = new Vector3(-1221.659f, -3500.85f, 13.94022f); } else if (listItem == LetterScraps) { if (listItem.Index == 0) Game.Player.Character.Position = new Vector3(65.34869f, 6666.156f, 31.78671f); if (listItem.Index == 1) Game.Player.Character.Position = new Vector3(1466.263f, 6553.133f, 14.00003f); if (listItem.Index == 2) Game.Player.Character.Position = new Vector3(1439.065f, 6339.318f, 23.97289f); if (listItem.Index == 3) Game.Player.Character.Position = new Vector3(-407.6179f, 6317.704f, 32.22429f); if (listItem.Index == 4) Game.Player.Character.Position = new Vector3(448.968f, 5571.466f, 781.1895f); if (listItem.Index == 5) Game.Player.Character.Position = new Vector3(-577.3812f, 5475.307f, 59.59092f); if (listItem.Index == 6) Game.Player.Character.Position = new Vector3(3439.125f, 5171.243f, 7.382134f); if (listItem.Index == 7) Game.Player.Character.Position = new Vector3(1885.61f, 5072.688f, 49.91392f); if (listItem.Index == 8) Game.Player.Character.Position = new Vector3(-998.3422f, 4851.768f, 274.6058f); if (listItem.Index == 9) Game.Player.Character.Position = new Vector3(-6.790287f, 4333.423f, 30.95481f); if (listItem.Index == 10) Game.Player.Character.Position = new Vector3(1340.616f, 4310.821f, 38.05003f); if (listItem.Index == 11) Game.Player.Character.Position = new Vector3(-1615.989f, 4254.568f, 104.6422f); if (listItem.Index == 12) Game.Player.Character.Position = new Vector3(1560.667f, 3570.773f, 34.21519f); if (listItem.Index == 13) Game.Player.Character.Position = new Vector3(1296.115f, 2999.824f, 57.45974f); if (listItem.Index == 14) Game.Player.Character.Position = new Vector3(270.2968f, 2864.539f, 74.17455f); if (listItem.Index == 15) Game.Player.Character.Position = new Vector3(-289.0979f, 2845.869f, 54.49178f); if (listItem.Index == 16) Game.Player.Character.Position = new Vector3(-863.0441f, 2764.57f, 12.18814f); if (listItem.Index == 17) Game.Player.Character.Position = new Vector3(-2375.308f, 2653.895f, 1.945716f); if (listItem.Index == 18) Game.Player.Character.Position = new Vector3(927.8638f, 2443.79f, 49.96547f); if (listItem.Index == 19) Game.Player.Character.Position = new Vector3(181.7735f, 2260.24f, 91.67735f); if (listItem.Index == 20) Game.Player.Character.Position = new Vector3(3072.118f, 2209.815f, 2.095346f); if (listItem.Index == 21) Game.Player.Character.Position = new Vector3(-598.6772f, 2095.236f, 131.0359f); if (listItem.Index == 22) Game.Player.Character.Position = new Vector3(3086.63f, 1650.125f, 2.997782f); if (listItem.Index == 23) Game.Player.Character.Position = new Vector3(-424.2659f, 1593.65f, 356.0899f); if (listItem.Index == 24) Game.Player.Character.Position = new Vector3(-1552.149f, 1379.944f, 126.3862f); if (listItem.Index == 25) Game.Player.Character.Position = new Vector3(683.9818f, 1204.636f, 345.3259f); if (listItem.Index == 26) Game.Player.Character.Position = new Vector3(-142.4939f, 865.4499f, 232.6988f); if (listItem.Index == 27) Game.Player.Character.Position = new Vector3(-2301.925f, 214.8605f, 167.6018f); if (listItem.Index == 28) Game.Player.Character.Position = new Vector3(1054.501f, 172.1009f, 88.7405f); if (listItem.Index == 29) Game.Player.Character.Position = new Vector3(-348.2878f, 53.02789f, 53.97811f); if (listItem.Index == 30) Game.Player.Character.Position = new Vector3(-3019.106f, 38.84162f, 10.11778f); if (listItem.Index == 31) Game.Player.Character.Position = new Vector3(265.6096f, -196.0606f, 61.78744f); if (listItem.Index == 32) Game.Player.Character.Position = new Vector3(-1724.862f, -199.2318f, 57.67747f); if (listItem.Index == 33) Game.Player.Character.Position = new Vector3(1093.903f, -212.4823f, 56.64005f); if (listItem.Index == 34) Game.Player.Character.Position = new Vector3(84.11265f, -437.2677f, 38.28443f); if (listItem.Index == 35) Game.Player.Character.Position = new Vector3(-1241.847f, -509.9374f, 38.60191f); if (listItem.Index == 36) Game.Player.Character.Position = new Vector3(-120.4983f, -977.9604f, 304.2492f); if (listItem.Index == 37) Game.Player.Character.Position = new Vector3(641.1895f, -1034.883f, 36.88861f); if (listItem.Index == 38) Game.Player.Character.Position = new Vector3(-1817.849f, -1200.371f, 19.16463f); if (listItem.Index == 39) Game.Player.Character.Position = new Vector3(-1031.167f, -1281.027f, 1.886165f); if (listItem.Index == 40) Game.Player.Character.Position = new Vector3(2864.857f, -1377.007f, 2.462856f); if (listItem.Index == 41) Game.Player.Character.Position = new Vector3(-1385.745f, -1406.125f, 3.223899f); if (listItem.Index == 42) Game.Player.Character.Position = new Vector3(1.632038f, -1732.346f, 31.42474f); if (listItem.Index == 43) Game.Player.Character.Position = new Vector3(66.54893f, -1963.919f, 20.91306f); if (listItem.Index == 44) Game.Player.Character.Position = new Vector3(1509.555f, -2125.469f, 76.20045f); if (listItem.Index == 45) Game.Player.Character.Position = new Vector3(751.3604f, -2298.847f, 19.30667f); if (listItem.Index == 46) Game.Player.Character.Position = new Vector3(-918.9688f, -2530.136f, 23.32149f); if (listItem.Index == 47) Game.Player.Character.Position = new Vector3(-79.09715f, -2726.035f, 8.7402f); if (listItem.Index == 48) Game.Player.Character.Position = new Vector3(-1047.428f, -2733.717f, 13.82589f); if (listItem.Index == 49) Game.Player.Character.Position = new Vector3(1022.074f, -3026.501f, 14.32748f); } } #endregion }
/// <summary> /// Remove menu binding from button with specific menu. /// </summary> /// <param name="menuToRelease">What menu to release</param> /// <param name="releaseFrom">Button to release from.</param> /// <returns>Returns true if the operation was successful.</returns> public bool ReleaseMenuFromItem(UIMenuItem releaseFrom, UIMenu menuToRelease) { if (!Children.ContainsKey(releaseFrom) || Children[releaseFrom] != menuToRelease) return false; menuToRelease.ParentItem = null; menuToRelease.ParentMenu = null; Children.Remove(releaseFrom); return true; }
/// <summary> /// Add your menu to the menu pool. /// </summary> /// <param name="menu"></param> public void Add(UIMenu menu) { _menuList.Add(menu); menu._poolcontainer = this; }
//menu private UIMenu mis_menu() { mi_menu = new UIMenu("", "GTAV BUS MOD"); menu_p.Add(mi_menu); List<dynamic> mission_name = _get_mission_name(); var start_but = new UIMenuItem("Start", "Click to start mission."); mi_menu.AddItem(start_but); var _mission_list = new UIMenuListItem("Missions List", mission_name, 0, "Choose mission"); mi_menu.AddItem(_mission_list); var _cancel = new UIMenuItem("Cancel", "Cancel current mission"); _cancel.Enabled = false; mi_menu.AddItem(_cancel); if (_lock) { start_but.Enabled = false; _mission_list.Enabled = false; _cancel.Enabled = true; } mi_menu.SetBannerType("scripts\\bus_mod.png"); mi_menu.OnItemSelect += OnItemSelect; mi_menu.OnListChange += OnListChange; mi_menu.RefreshIndex(); return mi_menu; }
private void OnItemSelect(UIMenu sender, UIMenuItem selectedItem, int index) { #region SenderTeleport if (sender == teleportMenu) { switch (index) { case 2: Game.Player.Character.Position = GetWaypointCoords(); break; case 3: Game.Player.Character.Position = GetBlipCoords(40); break; case 4: Game.Player.Character.Position = GetBlipCoords(110); break; case 5: Game.Player.Character.Position = GetBlipCoords(313); break; case 6: Game.Player.Character.Position = GetBlipCoords(357); break; case 7: Game.Player.Character.Position = GetBlipCoords(71); break; } } #endregion #region SenderSpawnVehicle if (sender == spawnMenu) { if (index == 0) SpawnCar(VehicleHash.Adder, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 1) SpawnCar(VehicleHash.Airbus, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 2) SpawnCar(VehicleHash.Airtug, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 3) SpawnCar(VehicleHash.Akuma, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 4) SpawnCar(VehicleHash.Ambulance, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 5) SpawnCar(VehicleHash.Annihilator, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 6) SpawnCar(VehicleHash.Asea, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 7) SpawnCar(VehicleHash.Asea2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 8) SpawnCar(VehicleHash.Asterope, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 9) SpawnCar(VehicleHash.Bagger, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 10) SpawnCar(VehicleHash.Baller, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 11) SpawnCar(VehicleHash.Baller2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 12) SpawnCar(VehicleHash.Banshee, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 13) SpawnCar(VehicleHash.Barracks, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 14) SpawnCar(VehicleHash.Barracks2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 15) SpawnCar(VehicleHash.Bati, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 16) SpawnCar(VehicleHash.Bati2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 17) SpawnCar(VehicleHash.Benson, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 18) SpawnCar(VehicleHash.BfInjection, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 19) SpawnCar(VehicleHash.Biff, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 20) SpawnCar(VehicleHash.Bison, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 21) SpawnCar(VehicleHash.Bison2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 22) SpawnCar(VehicleHash.Bison3, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 23) SpawnCar(VehicleHash.BJXL, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 24) SpawnCar(VehicleHash.Blazer, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 25) SpawnCar(VehicleHash.Blazer2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 26) SpawnCar(VehicleHash.Blazer3, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 27) SpawnCar(VehicleHash.Blimp, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 28) SpawnCar(VehicleHash.Blista, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 29) SpawnCar(VehicleHash.Bmx, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 30) SpawnCar(VehicleHash.BobcatXL, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 31) SpawnCar(VehicleHash.Bodhi2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 32) SpawnCar(VehicleHash.Boxville, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 33) SpawnCar(VehicleHash.Boxville2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 34) SpawnCar(VehicleHash.Boxville3, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 35) SpawnCar(VehicleHash.Buccaneer, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 36) SpawnCar(VehicleHash.Buffalo, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 37) SpawnCar(VehicleHash.Buffalo2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 38) SpawnCar(VehicleHash.Bulldozer, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 39) SpawnCar(VehicleHash.Bullet, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 40) SpawnCar(VehicleHash.Burrito, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 41) SpawnCar(VehicleHash.Burrito2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 42) SpawnCar(VehicleHash.Burrito3, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 43) SpawnCar(VehicleHash.Burrito4, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 44) SpawnCar(VehicleHash.Burrito5, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 45) SpawnCar(VehicleHash.Bus, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 46) SpawnCar(VehicleHash.Buzzard, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 47) SpawnCar(VehicleHash.Buzzard2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 48) SpawnCar(VehicleHash.Caddy, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 49) SpawnCar(VehicleHash.Caddy2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 50) SpawnCar(VehicleHash.Camper, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 51) SpawnCar(VehicleHash.Carbonizzare, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 52) SpawnCar(VehicleHash.CarbonRS, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 53) SpawnCar(VehicleHash.Cargobob, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 54) SpawnCar(VehicleHash.Cargobob2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 55) SpawnCar(VehicleHash.Cargobob3, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 56) SpawnCar(VehicleHash.CargoPlane, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 57) SpawnCar(VehicleHash.Cavalcade, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 58) SpawnCar(VehicleHash.Cavalcade2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 59) SpawnCar(VehicleHash.Cheetah, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 60) SpawnCar(VehicleHash.Coach, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 61) SpawnCar(VehicleHash.CogCabrio, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 62) SpawnCar(VehicleHash.Comet2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 63) SpawnCar(VehicleHash.Coquette, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 64) SpawnCar(VehicleHash.Cruiser, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 65) SpawnCar(VehicleHash.Crusader, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 66) SpawnCar(VehicleHash.Cuban800, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 67) SpawnCar(VehicleHash.Cutter, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 68) SpawnCar(VehicleHash.Daemon, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 69) SpawnCar(VehicleHash.Dilettante, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 70) SpawnCar(VehicleHash.Dilettante2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 71) SpawnCar(VehicleHash.Dinghy, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 72) SpawnCar(VehicleHash.Dinghy2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 73) SpawnCar(VehicleHash.DLoader, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 74) SpawnCar(VehicleHash.Docktug, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 75) SpawnCar(VehicleHash.Dominator, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 76) SpawnCar(VehicleHash.Double, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 77) SpawnCar(VehicleHash.Dubsta, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 78) SpawnCar(VehicleHash.Dubsta2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 79) SpawnCar(VehicleHash.Dump, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 80) SpawnCar(VehicleHash.Dune, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 81) SpawnCar(VehicleHash.Dune2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 82) SpawnCar(VehicleHash.Duster, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 83) SpawnCar(VehicleHash.Elegy2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 84) SpawnCar(VehicleHash.Emperor, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 85) SpawnCar(VehicleHash.Emperor2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 86) SpawnCar(VehicleHash.Emperor3, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 87) SpawnCar(VehicleHash.EntityXF, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 88) SpawnCar(VehicleHash.Exemplar, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 89) SpawnCar(VehicleHash.F620, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 90) SpawnCar(VehicleHash.Faggio2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 91) SpawnCar(VehicleHash.FBI, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 92) SpawnCar(VehicleHash.FBI2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 93) SpawnCar(VehicleHash.Felon, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 94) SpawnCar(VehicleHash.Felon2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 95) SpawnCar(VehicleHash.Feltzer2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 96) SpawnCar(VehicleHash.FireTruck, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 97) SpawnCar(VehicleHash.Fixter, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 98) SpawnCar(VehicleHash.Flatbed, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 99) SpawnCar(VehicleHash.Forklift, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 100) SpawnCar(VehicleHash.Fq2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 101) SpawnCar(VehicleHash.Frogger, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 102) SpawnCar(VehicleHash.Frogger2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 103) SpawnCar(VehicleHash.Fugitive, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 104) SpawnCar(VehicleHash.Fusilade, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 105) SpawnCar(VehicleHash.Futo, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 106) SpawnCar(VehicleHash.Gauntlet, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 107) SpawnCar(VehicleHash.GBurrito, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 108) SpawnCar(VehicleHash.Granger, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 109) SpawnCar(VehicleHash.Gresley, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 110) SpawnCar(VehicleHash.Habanero, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 111) SpawnCar(VehicleHash.Handler, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 112) SpawnCar(VehicleHash.Hauler, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 113) SpawnCar(VehicleHash.Hexer, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 114) SpawnCar(VehicleHash.Hotknife, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 115) SpawnCar(VehicleHash.Infernus, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 116) SpawnCar(VehicleHash.Ingot, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 117) SpawnCar(VehicleHash.Intruder, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 118) SpawnCar(VehicleHash.Issi2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 119) SpawnCar(VehicleHash.Jackal, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 120) SpawnCar(VehicleHash.JB700, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 121) SpawnCar(VehicleHash.Jet, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 122) SpawnCar(VehicleHash.Jetmax, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 123) SpawnCar(VehicleHash.Journey, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 124) SpawnCar(VehicleHash.Khamelion, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 125) SpawnCar(VehicleHash.Landstalker, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 126) SpawnCar(VehicleHash.Lazer, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 127) SpawnCar(VehicleHash.Lguard, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 128) SpawnCar(VehicleHash.Luxor, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 129) SpawnCar(VehicleHash.Mammatus, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 130) SpawnCar(VehicleHash.Manana, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 131) SpawnCar(VehicleHash.Marquis, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 132) SpawnCar(VehicleHash.Maverick, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 133) SpawnCar(VehicleHash.Mesa, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 134) SpawnCar(VehicleHash.Mesa2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 135) SpawnCar(VehicleHash.Mesa3, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 136) SpawnCar(VehicleHash.Minivan, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 137) SpawnCar(VehicleHash.Mixer, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 138) SpawnCar(VehicleHash.Mixer2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 139) SpawnCar(VehicleHash.Monroe, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 140) SpawnCar(VehicleHash.Mower, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 141) SpawnCar(VehicleHash.Mule, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 142) SpawnCar(VehicleHash.Mule2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 143) SpawnCar(VehicleHash.Nemesis, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 144) SpawnCar(VehicleHash.Ninef, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 145) SpawnCar(VehicleHash.Ninef2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 146) SpawnCar(VehicleHash.Oracle, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 147) SpawnCar(VehicleHash.Oracle2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 148) SpawnCar(VehicleHash.Packer, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 149) SpawnCar(VehicleHash.Patriot, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 150) SpawnCar(VehicleHash.PBus, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 151) SpawnCar(VehicleHash.PCJ, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 152) SpawnCar(VehicleHash.Penumbra, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 153) SpawnCar(VehicleHash.Peyote, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 154) SpawnCar(VehicleHash.Phantom, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 155) SpawnCar(VehicleHash.Phoenix, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 156) SpawnCar(VehicleHash.Picador, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 157) SpawnCar(VehicleHash.Police, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 158) SpawnCar(VehicleHash.Police2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 159) SpawnCar(VehicleHash.Police3, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 160) SpawnCar(VehicleHash.Police4, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 161) SpawnCar(VehicleHash.Policeb, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 162) SpawnCar(VehicleHash.PoliceOld1, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 163) SpawnCar(VehicleHash.PoliceOld2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 164) SpawnCar(VehicleHash.PoliceT, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 165) SpawnCar(VehicleHash.Polmav, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 166) SpawnCar(VehicleHash.Pony, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 167) SpawnCar(VehicleHash.Pony2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 168) SpawnCar(VehicleHash.Pounder, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 169) SpawnCar(VehicleHash.Prairie, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 170) SpawnCar(VehicleHash.Pranger, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 171) SpawnCar(VehicleHash.Predator, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 172) SpawnCar(VehicleHash.Premier, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 173) SpawnCar(VehicleHash.Primo, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 174) SpawnCar(VehicleHash.Radi, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 175) SpawnCar(VehicleHash.RancherXL, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 176) SpawnCar(VehicleHash.RancherXL2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 177) SpawnCar(VehicleHash.RapidGT, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 178) SpawnCar(VehicleHash.RapidGT2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 179) SpawnCar(VehicleHash.RatLoader, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 180) SpawnCar(VehicleHash.Rebel, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 181) SpawnCar(VehicleHash.Rebel2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 182) SpawnCar(VehicleHash.Regina, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 183) SpawnCar(VehicleHash.RentalBus, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 184) SpawnCar(VehicleHash.Rhino, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 185) SpawnCar(VehicleHash.Riot, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 186) SpawnCar(VehicleHash.Ripley, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 187) SpawnCar(VehicleHash.Rocoto, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 188) SpawnCar(VehicleHash.Romero, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 189) SpawnCar(VehicleHash.Rubble, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 190) SpawnCar(VehicleHash.Ruffian, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 191) SpawnCar(VehicleHash.Ruiner, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 192) SpawnCar(VehicleHash.Rumpo, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 193) SpawnCar(VehicleHash.Rumpo2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 194) SpawnCar(VehicleHash.SabreGT, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 195) SpawnCar(VehicleHash.Sadler, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 196) SpawnCar(VehicleHash.Sadler2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 197) SpawnCar(VehicleHash.Sanchez, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 198) SpawnCar(VehicleHash.Sanchez2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 199) SpawnCar(VehicleHash.Sandking, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 200) SpawnCar(VehicleHash.Sandking2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 201) SpawnCar(VehicleHash.Schafter2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 202) SpawnCar(VehicleHash.Schwarzer, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 203) SpawnCar(VehicleHash.Scorcher, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 204) SpawnCar(VehicleHash.Scrap, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 205) SpawnCar(VehicleHash.Seashark, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 206) SpawnCar(VehicleHash.Seashark2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 207) SpawnCar(VehicleHash.Seminole, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 208) SpawnCar(VehicleHash.Sentinel, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 209) SpawnCar(VehicleHash.Sentinel2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 210) SpawnCar(VehicleHash.Serrano, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 211) SpawnCar(VehicleHash.Shamal, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 212) SpawnCar(VehicleHash.Sheriff, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 213) SpawnCar(VehicleHash.Sheriff2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 214) SpawnCar(VehicleHash.Skylift, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 215) SpawnCar(VehicleHash.Speedo, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 216) SpawnCar(VehicleHash.Speedo2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 217) SpawnCar(VehicleHash.Squalo, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 218) SpawnCar(VehicleHash.Stanier, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 219) SpawnCar(VehicleHash.Stinger, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 220) SpawnCar(VehicleHash.StingerGT, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 221) SpawnCar(VehicleHash.Stockade, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 222) SpawnCar(VehicleHash.Stockade3, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 223) SpawnCar(VehicleHash.Stratum, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 224) SpawnCar(VehicleHash.Stretch, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 225) SpawnCar(VehicleHash.Stunt, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 226) SpawnCar(VehicleHash.Submersible, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 227) SpawnCar(VehicleHash.Sultan, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 228) SpawnCar(VehicleHash.Suntrap, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 229) SpawnCar(VehicleHash.Superd, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 230) SpawnCar(VehicleHash.Surano, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 231) SpawnCar(VehicleHash.Surfer, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 232) SpawnCar(VehicleHash.Surfer2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 233) SpawnCar(VehicleHash.Surge, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 234) SpawnCar(VehicleHash.Taco, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 235) SpawnCar(VehicleHash.Tailgater, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 236) SpawnCar(VehicleHash.TankerCar, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 237) SpawnCar(VehicleHash.Taxi, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 238) SpawnCar(VehicleHash.TipTruck, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 239) SpawnCar(VehicleHash.TipTruck2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 240) SpawnCar(VehicleHash.Titan, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 241) SpawnCar(VehicleHash.Tornado, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 242) SpawnCar(VehicleHash.Tornado2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 243) SpawnCar(VehicleHash.Tornado3, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 244) SpawnCar(VehicleHash.Tornado4, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 245) SpawnCar(VehicleHash.Tourbus, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 246) SpawnCar(VehicleHash.TowTruck, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 247) SpawnCar(VehicleHash.TowTruck2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 248) SpawnCar(VehicleHash.Tractor, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 249) SpawnCar(VehicleHash.Tractor2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 250) SpawnCar(VehicleHash.Tractor3, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 251) SpawnCar(VehicleHash.Trash, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 252) SpawnCar(VehicleHash.Tropic, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 253) SpawnCar(VehicleHash.UtilliTruck, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 254) SpawnCar(VehicleHash.UtilliTruck2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 255) SpawnCar(VehicleHash.UtilliTruck3, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 256) SpawnCar(VehicleHash.Vacca, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 257) SpawnCar(VehicleHash.Vader, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 258) SpawnCar(VehicleHash.Velum, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 259) SpawnCar(VehicleHash.Vigero, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 260) SpawnCar(VehicleHash.Voltic, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 261) SpawnCar(VehicleHash.Voodoo2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 262) SpawnCar(VehicleHash.Washington, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 263) SpawnCar(VehicleHash.Youga, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 264) SpawnCar(VehicleHash.Zion, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 265) SpawnCar(VehicleHash.Zion2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 266) SpawnCar(VehicleHash.Ztype, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 267) SpawnCar(VehicleHash.Bifta, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 268) SpawnCar(VehicleHash.Kalahari, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 269) SpawnCar(VehicleHash.Paradise, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 270) SpawnCar(VehicleHash.Speeder, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 271) SpawnCar(VehicleHash.Alpha, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 272) SpawnCar(VehicleHash.Jester, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 273) SpawnCar(VehicleHash.Turismor, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 274) SpawnCar(VehicleHash.Vestra, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 275) SpawnCar(VehicleHash.Huntley, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 276) SpawnCar(VehicleHash.Massacro, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 277) SpawnCar(VehicleHash.Thrust, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 278) SpawnCar(VehicleHash.Zentorno, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 279) SpawnCar(VehicleHash.Blade, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 280) SpawnCar(VehicleHash.Dubsta3, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 281) SpawnCar(VehicleHash.Glendale, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 282) SpawnCar(VehicleHash.Panto, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 283) SpawnCar(VehicleHash.Pigalle, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 284) SpawnCar(VehicleHash.Rhapsody, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 285) SpawnCar(VehicleHash.Warrener, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 286) SpawnCar(VehicleHash.Monster, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 287) SpawnCar(VehicleHash.Sovereign, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 288) SpawnCar(VehicleHash.Furoregt, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 289) SpawnCar(VehicleHash.Hakuchou, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 290) SpawnCar(VehicleHash.Innovation, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 291) SpawnCar(VehicleHash.Besra, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 292) SpawnCar(VehicleHash.Coquette2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 293) SpawnCar(VehicleHash.Miljet, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 294) SpawnCar(VehicleHash.Swift, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 295) SpawnCar(VehicleHash.BType, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 296) SpawnCar(VehicleHash.Blimp2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 297) SpawnCar(VehicleHash.Blista2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 298) SpawnCar(VehicleHash.Blista3, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 299) SpawnCar(VehicleHash.Buffalo3, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 300) SpawnCar(VehicleHash.Dodo, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 301) SpawnCar(VehicleHash.Dominator2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 302) SpawnCar(VehicleHash.Dukes, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 303) SpawnCar(VehicleHash.Dukes2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 304) SpawnCar(VehicleHash.Gauntlet2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 305) SpawnCar(VehicleHash.Marshall, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 306) SpawnCar(VehicleHash.Stalion, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 307) SpawnCar(VehicleHash.Stalion2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 308) SpawnCar(VehicleHash.Submersible2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 309) SpawnCar(VehicleHash.Jester2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 310) SpawnCar(VehicleHash.Massacro2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 311) SpawnCar(VehicleHash.RatLoader2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 312) SpawnCar(VehicleHash.SlamVan, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 313) SpawnCar(VehicleHash.BType2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 314) SpawnCar(VehicleHash.Lurcher, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 315) SpawnCar(VehicleHash.Barracks3, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 316) SpawnCar(VehicleHash.Boxville4, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 317) SpawnCar(VehicleHash.Casco, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 318) SpawnCar(VehicleHash.Dinghy3, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 319) SpawnCar(VehicleHash.Enduro, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 320) SpawnCar(VehicleHash.GBurrito2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 321) SpawnCar(VehicleHash.Guardian, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 322) SpawnCar(VehicleHash.Hydra, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 323) SpawnCar(VehicleHash.Insurgent, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 324) SpawnCar(VehicleHash.Insurgent2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 325) SpawnCar(VehicleHash.Kuruma, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 326) SpawnCar(VehicleHash.Kuruma2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 327) SpawnCar(VehicleHash.Lectro, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 328) SpawnCar(VehicleHash.Mule3, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 329) SpawnCar(VehicleHash.Savage, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 330) SpawnCar(VehicleHash.SlamVan2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 331) SpawnCar(VehicleHash.Technical, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 332) SpawnCar(VehicleHash.Trash2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 333) SpawnCar(VehicleHash.Valkyrie, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 334) SpawnCar(VehicleHash.Velum2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 335) SpawnCar(VehicleHash.Buccaneer2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 336) SpawnCar(VehicleHash.Chino2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 337) SpawnCar(VehicleHash.Faction, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 338) SpawnCar(VehicleHash.Faction2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 339) SpawnCar(VehicleHash.Moonbeam, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 340) SpawnCar(VehicleHash.Moonbeam2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 341) SpawnCar(VehicleHash.Primo2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 342) SpawnCar(VehicleHash.Voodoo, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 343) SpawnCar(VehicleHash.Feltzer3, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 344) SpawnCar(VehicleHash.Luxor2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 345) SpawnCar(VehicleHash.Osiris, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 346) SpawnCar(VehicleHash.Swift2, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 347) SpawnCar(VehicleHash.Virgo, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 348) SpawnCar(VehicleHash.Windsor, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 349) SpawnCar(VehicleHash.Brawler, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 350) SpawnCar(VehicleHash.Chino, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 351) SpawnCar(VehicleHash.Coquette3, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 352) SpawnCar(VehicleHash.T20, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 353) SpawnCar(VehicleHash.Toro, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); if (index == 354) SpawnCar(VehicleHash.Vindicator, (Game.Player.Character.Position + new Vector3(0f, 0f, 1f)), Game.Player.Character.Heading); } #endregion #region SenderGeneral if (sender == generalMenu) { switch (index) { case 1: Game.ShowSaveMenu(); break; } } #endregion #region SenderPlayer if (sender == playerMenu) { switch(index) { case 4: Game.Player.Money += 10000; UI.Notify("~HUD_COLOUR_BLUE~ You get 10000$"); break; case 7: Game.Player.Character.Health = 1000; UI.Notify("~HUD_COLOUR_BLUE~ You get full health"); break; case 8: Game.Player.Character.Armor = 1000; UI.Notify("~HUD_COLOUR_BLUE~ You get full armour"); break; } } #endregion #region SenderVehicle if (sender == carMenu) { Vehicle veh = Game.Player.Character.CurrentVehicle; switch(index) { case 1: veh.PlaceOnGround(); break; case 2: veh.DirtLevel = 0; break; case 4: Game.Player.Character.Task.DriveTo(veh, World.GetWaypointPosition(), 0f, 200, 55); break; case 5: Game.Player.Character.Task.ClearAll(); break; case 7: veh.Repair(); break; case 8: veh.OpenDoor(VehicleDoor.FrontLeftDoor, false, false); break; case 9: veh.OpenDoor(VehicleDoor.FrontRightDoor, false, false); break; case 10: veh.OpenDoor(VehicleDoor.BackLeftDoor, false, false); break; case 11: veh.OpenDoor(VehicleDoor.BackRightDoor, false, false); break; case 12: veh.OpenDoor(VehicleDoor.Hood, false, false); break; case 13: veh.OpenDoor(VehicleDoor.Trunk, false, false); break; case 14: veh.OpenDoor(VehicleDoor.Hood, false, false); veh.OpenDoor(VehicleDoor.BackRightDoor, false, false); veh.OpenDoor(VehicleDoor.BackLeftDoor, false, false); veh.OpenDoor(VehicleDoor.Trunk, false, false); veh.OpenDoor(VehicleDoor.FrontLeftDoor, false, false); veh.OpenDoor(VehicleDoor.FrontRightDoor, false, false); break; case 15: veh.CloseDoor(VehicleDoor.FrontLeftDoor, false); break; case 16: veh.CloseDoor(VehicleDoor.FrontRightDoor, false); break; case 17: veh.CloseDoor(VehicleDoor.BackLeftDoor, false); break; case 18: veh.CloseDoor(VehicleDoor.BackRightDoor, false); break; case 19: veh.CloseDoor(VehicleDoor.Hood, false); break; case 20: veh.CloseDoor(VehicleDoor.Trunk, false); break; case 21: veh.CloseDoor(VehicleDoor.Hood, false); veh.CloseDoor(VehicleDoor.BackRightDoor, false); veh.CloseDoor(VehicleDoor.BackLeftDoor, false); veh.CloseDoor(VehicleDoor.Trunk, false); veh.CloseDoor(VehicleDoor.FrontLeftDoor, false); veh.CloseDoor(VehicleDoor.FrontRightDoor, false); break; } } #endregion #region SenderTime if (sender == timeMenu) { if (index == 0) Function.Call(Hash.SET_TIME_SCALE,0.25); if (index == 1) Function.Call(Hash.SET_TIME_SCALE, 0.50); if (index == 2) Function.Call(Hash.SET_TIME_SCALE, 0.75); if (index == 3) Function.Call(Hash.SET_TIME_SCALE, 1.0); if (index == 4) Function.Call(Hash.SET_TIME_SCALE, 1.5); if (index == 5) SetTime(12, 0, 0); if (index == 6) SetTime(18, 0, 0); if (index == 7) SetTime(23, 0, 0); if (index == 8) SetTime(5, 0, 0); if (index == 9) SetTime(World.CurrentDayTime.Hours + 1, 0, 0); if (index == 10) SetTime(World.CurrentDayTime.Hours - 1, 0, 0); } #endregion #region SenderWeather if (sender == weatherMenu) { if (index == 0) World.Weather = Weather.Blizzard; if (index == 1) World.Weather = Weather.Christmas; if (index == 2) World.Weather = Weather.Clear; if (index == 3) World.Weather = Weather.Clearing; if (index == 4) World.Weather = Weather.Clouds; if (index == 5) World.Weather = Weather.ExtraSunny; if (index == 6) World.Weather = Weather.Foggy; if (index == 7) World.Weather = Weather.Neutral; if (index == 8) World.Weather = Weather.Overcast; if (index == 9) World.Weather = Weather.Raining; if (index == 10) World.Weather = Weather.Smog; if (index == 11) World.Weather = Weather.Snowing; if (index == 12) World.Weather = Weather.Snowlight; if (index == 13) World.Weather = Weather.ThunderStorm; } #endregion #region SenderWeapon if (sender == weaponMenu) { if (index == 0) Game.Player.Character.Weapons.Give(WeaponHash.Bat, 1, true, true); if (index == 1) Game.Player.Character.Weapons.Give(WeaponHash.Knife, 1, true, true); if (index == 2) Game.Player.Character.Weapons.Give(WeaponHash.Nightstick, 1, true, true); if (index == 3) Game.Player.Character.Weapons.Give(WeaponHash.Crowbar, 1, true, true); if (index == 4) Game.Player.Character.Weapons.Give(WeaponHash.GolfClub, 1, true, true); if (index == 5) Game.Player.Character.Weapons.Give(WeaponHash.Hammer, 1, true, true); if (index == 6) Game.Player.Character.Weapons.Give(WeaponHash.Bottle, 1, true, true); if (index == 7) Game.Player.Character.Weapons.Give(WeaponHash.Dagger, 1, true, true); if (index == 8) Game.Player.Character.Weapons.Give(WeaponHash.Hatchet, 1, true, true); if (index == 9) Game.Player.Character.Weapons.Give(WeaponHash.KnuckleDuster, 1, true, true); if (index == 10) Game.Player.Character.Weapons.Give(WeaponHash.Machete, 1, true, true); if (index == 11) Game.Player.Character.Weapons.Give(WeaponHash.Flashlight, 1, true, true); if (index == 12) Game.Player.Character.Weapons.Give(WeaponHash.Pistol, 1, true, true); if (index == 13) Game.Player.Character.Weapons.Give(WeaponHash.CombatPistol, 1, true, true); if (index == 14) Game.Player.Character.Weapons.Give(WeaponHash.APPistol, 1, true, true); if (index == 15) Game.Player.Character.Weapons.Give(WeaponHash.StunGun, 1, true, true); if (index == 16) Game.Player.Character.Weapons.Give(WeaponHash.Pistol50, 1, true, true); if (index == 17) Game.Player.Character.Weapons.Give(WeaponHash.SNSPistol, 1, true, true); if (index == 18) Game.Player.Character.Weapons.Give(WeaponHash.HeavyPistol, 1, true, true); if (index == 19) Game.Player.Character.Weapons.Give(WeaponHash.VintagePistol, 1, true, true); if (index == 20) Game.Player.Character.Weapons.Give(WeaponHash.FlareGun, 1, true, true); if (index == 21) Game.Player.Character.Weapons.Give(WeaponHash.MarksmanPistol, 1, true, true); if (index == 22) Game.Player.Character.Weapons.Give(WeaponHash.MicroSMG, 1, true, true); if (index == 23) Game.Player.Character.Weapons.Give(WeaponHash.SMG, 1, true, true); if (index == 24) Game.Player.Character.Weapons.Give(WeaponHash.AssaultSMG, 1, true, true); if (index == 25) Game.Player.Character.Weapons.Give(WeaponHash.CombatPDW, 1, true, true); if (index == 26) Game.Player.Character.Weapons.Give(WeaponHash.MachinePistol, 1, true, true); if (index == 27) Game.Player.Character.Weapons.Give(WeaponHash.PumpShotgun, 1, true, true); if (index == 28) Game.Player.Character.Weapons.Give(WeaponHash.SawnOffShotgun, 1, true, true); if (index == 29) Game.Player.Character.Weapons.Give(WeaponHash.AssaultShotgun, 1, true, true); if (index == 30) Game.Player.Character.Weapons.Give(WeaponHash.BullpupShotgun, 1, true, true); if (index == 31) Game.Player.Character.Weapons.Give(WeaponHash.Musket, 1, true, true); if (index == 32) Game.Player.Character.Weapons.Give(WeaponHash.HeavyShotgun, 1, true, true); if (index == 33) Game.Player.Character.Weapons.Give(WeaponHash.AssaultRifle, 1, true, true); if (index == 34) Game.Player.Character.Weapons.Give(WeaponHash.CarbineRifle, 1, true, true); if (index == 35) Game.Player.Character.Weapons.Give(WeaponHash.AdvancedRifle, 1, true, true); if (index == 36) Game.Player.Character.Weapons.Give(WeaponHash.SpecialCarbine, 1, true, true); if (index == 37) Game.Player.Character.Weapons.Give(WeaponHash.BullpupRifle, 1, true, true); if (index == 38) Game.Player.Character.Weapons.Give(WeaponHash.MG, 1, true, true); if (index == 39) Game.Player.Character.Weapons.Give(WeaponHash.CombatMG, 1, true, true); if (index == 40) Game.Player.Character.Weapons.Give(WeaponHash.Gusenberg, 1, true, true); if (index == 41) Game.Player.Character.Weapons.Give(WeaponHash.SniperRifle, 1, true, true); if (index == 42) Game.Player.Character.Weapons.Give(WeaponHash.HeavySniper, 1, true, true); if (index == 43) Game.Player.Character.Weapons.Give(WeaponHash.MarksmanRifle, 1, true, true); if (index == 44) Game.Player.Character.Weapons.Give(WeaponHash.RPG, 1, true, true); if (index == 45) Game.Player.Character.Weapons.Give(WeaponHash.GrenadeLauncher, 1, true, true); if (index == 46) Game.Player.Character.Weapons.Give(WeaponHash.GrenadeLauncherSmoke, 1, true, true); if (index == 47) Game.Player.Character.Weapons.Give(WeaponHash.Minigun, 1, true, true); if (index == 48) Game.Player.Character.Weapons.Give(WeaponHash.Firework, 1, true, true); if (index == 49) Game.Player.Character.Weapons.Give(WeaponHash.Railgun, 1, true, true); if (index == 50) Game.Player.Character.Weapons.Give(WeaponHash.HomingLauncher, 1, true, true); if (index == 51) Game.Player.Character.Weapons.Give(WeaponHash.Grenade, 1, true, true); if (index == 52) Game.Player.Character.Weapons.Give(WeaponHash.StickyBomb, 1, true, true); if (index == 53) Game.Player.Character.Weapons.Give(WeaponHash.SmokeGrenade, 1, true, true); if (index == 54) Game.Player.Character.Weapons.Give(WeaponHash.Molotov, 1, true, true); if (index == 55) Game.Player.Character.Weapons.Give(WeaponHash.ProximityMine, 1, true, true); if (index == 56) Game.Player.Character.Weapons.Give(WeaponHash.Snowball, 1, true, true); if (index == 57) Game.Player.Character.Weapons.Give(WeaponHash.BZGas, 1, true, true); if (index == 58) Game.Player.Character.Weapons.Give(WeaponHash.FireExtinguisher, 1, true, true); if (index == 59) Game.Player.Character.Weapons.Give(WeaponHash.PetrolCan, 1, true, true); if (index == 60) Game.Player.Character.Weapons.Give(WeaponHash.Digiscanner, 1, true, true); if (index == 61) Game.Player.Character.Weapons.Give(WeaponHash.Parachute, 1, true, true); } #endregion }
//when user change mission list private void OnListChange(UIMenu sender, UIMenuListItem listitem, int index) { if (sender == mi_menu) { mission = listitem.IndexToItem(index); } }
public void MenuChangeEv(UIMenu oldmenu, UIMenu newmenu, MenuState state) { OnMenuStateChanged?.Invoke(oldmenu, newmenu, state); }
/// <summary> /// Create and add a submenu to the menu pool with a custom offset. /// Adds an item with the given text to the menu, creates a corresponding submenu, and binds the submenu to the item. /// The submenu inherits its title from the menu, and its subtitle from the item text. /// </summary> /// <param name="menu">The parent menu to which the submenu must be added.</param> /// <param name="text">The name of the submenu</param> /// <param name="offset">The offset of the menu</param> /// <returns>The newly created submenu.</returns> public UIMenu AddSubMenu(UIMenu menu, string text, PointF offset) { return(AddSubMenu(menu, text, "", Point.Empty)); }
public void SetKey(UIMenu.MenuControls menuControl, Control control, int controllerIndex) { _menuList.ForEach(m => m.SetKey(menuControl, control, controllerIndex)); }
public void SetKey(UIMenu.MenuControls menuControl, Keys control) { _menuList.ForEach(m => m.SetKey(menuControl, control)); }
/// <summary> /// Add your menu to the menu pool. /// </summary> /// <param name="menu"></param> public void Add(UIMenu menu) { _menuList.Add(menu); }
public void ResetKey(UIMenu.MenuControls menuControl) { _menuList.ForEach(m => m.ResetKey(menuControl)); }
protected virtual void MenuChangeEv(UIMenu newmenu, bool forward) { OnMenuChange?.Invoke(this, newmenu, forward); }
private void OnCheckboxChange(UIMenu sender, UIMenuCheckboxItem checkboxItem, bool Checked) { if(sender == generalMenu) { if(HUD.Checked == true) { Function.Call(Hash.DISPLAY_HUD, 0); Function.Call(Hash.DISPLAY_RADAR, 0); } else if(HUD.Checked == false) { Function.Call(Hash.DISPLAY_HUD, 1); Function.Call(Hash.DISPLAY_RADAR, 1); } if (nVision.Checked == true) Function.Call(Hash.SET_NIGHTVISION,true); else Function.Call(Hash.SET_NIGHTVISION, false); } else if(sender == playerMenu) { if(GM.Checked== true) Game.Player.Character.IsInvincible = true; else if(GM.Checked == false) Game.Player.Character.IsInvincible = false; if(UA.Checked == true) { Game.Player.Character.Weapons.Current.AmmoInClip = Game.Player.Character.Weapons.Current.MaxAmmoInClip; Game.Player.Character.Weapons.Current.Ammo = Game.Player.Character.Weapons.Current.MaxAmmo; Game.Player.Character.Weapons.Current.InfiniteAmmo = true; Game.Player.Character.Weapons.Current.InfiniteAmmoClip = true; } if (VisibleP.Checked == true) Game.Player.Character.IsVisible = false; else if (VisibleP.Checked == false) Game.Player.Character.IsVisible = true; } else if(sender == carMenu) { if (CGM.Checked == true) { if (Game.Player.Character.IsSittingInVehicle()) { Vehicle veh = Game.Player.Character.CurrentVehicle; Function.Call(Hash.SET_ENTITY_INVINCIBLE, veh, true); Function.Call(Hash.SET_ENTITY_PROOFS, veh, 1, 1, 1, 1, 1, 1, 1, 1); veh.CanTiresBurst = false; Function.Call(Hash.SET_VEHICLE_WHEELS_CAN_BREAK, veh, 0); veh.CanBeVisiblyDamaged = false; } else if (!Game.Player.Character.IsSittingInVehicle()) { } } else if (CGM.Checked == false) { if (Game.Player.Character.IsSittingInVehicle()) { Vehicle veh = Game.Player.Character.CurrentVehicle; Function.Call(Hash.SET_ENTITY_INVINCIBLE, veh, false); Function.Call(Hash.SET_ENTITY_PROOFS, veh, 0, 0, 0, 0, 0, 0, 0, 0); veh.CanTiresBurst = true; Function.Call(Hash.SET_VEHICLE_WHEELS_CAN_BREAK, veh, 1); veh.CanBeVisiblyDamaged = true; } else if (!Game.Player.Character.IsSittingInVehicle()) { } } if (VisibleC.Checked == true) { if (Game.Player.Character.IsSittingInVehicle()) { Game.Player.Character.CurrentVehicle.IsVisible = false; } } else if(VisibleC.Checked == false) { if (Game.Player.Character.IsSittingInVehicle()) { Game.Player.Character.CurrentVehicle.IsVisible = true; } } } }
private void CreateDeadzoneMenu() { DeadzoneMenu = new UIMenu("Tobii Eye Tracking", "~b~FREELOOK DEADZONES"); DeadzoneMenu.SetMenuWidthOffset(50); DeadzoneMenu.AddItem(new UIMenuItem("Add Deadzone", "Deadzones prevent camera movement when you are looking inside the zone, for example, the minimap")); DeadzoneMenu.RefreshIndex(); _menuPool.Add(DeadzoneMenu); }