dlcpacks spawning c# ?
-
i know its asking alot but can any body help with showing me how to code a addon car into a script , im going by vehicle selector , any ways to make this grab dlcpacks instead please ?
{ UIMenu subMenu = _menuPool.AddSubMenu(sub4, "~b~Vehicle Selector", "Click to view ~b~Vehicle Selector"); List<dynamic> listOfVehicles = new List<dynamic>(); VehicleHash[] allVehicleHashes = (VehicleHash[])Enum.GetValues(typeof(VehicleHash)); for (int i = 0; i < allVehicleHashes.Length; i++) { listOfVehicles.Add(allVehicleHashes [i]); } UIMenuListItem list = new UIMenuListItem("Vehicle: ", listOfVehicles, 0); subMenu.AddItem(list); UIMenuItem getVehicle = new UIMenuItem("Get Vehicle"); subMenu.AddItem(getVehicle); subMenu.OnItemSelect += (sender, item, index) => { if (item == getVehicle) { int listIndex = list.Index; VehicleHash hash = allVehicleHashes[listIndex]; Ped gamePed = Game.Player.Character; Vehicle v = World.CreateVehicle(hash, gamePed.Position, gamePed.Heading); v.PlaceOnGround(); gamePed.Task.WarpIntoVehicle(v, VehicleSeat.Driver); } }; }
-
so im still stuck on this topic , i have manged to create a ped selector out of this , ive manged to write another code which grabs addon vehicles name by name , but not able to use this script to find all addon vehicles as a list ? any help would be great
-
Not possible without reading the memory of GTA V directly, or writing the addon vehicle models in a text file and reading that text file.
This mod reads the memory directly, but it is in C++: https://github.com/E66666666/GTAVAddonLoader