how can i add spoiler or roof in my car like using los santos custom
-
hi
how can i add spoiler or roof in my car like using los santos custom ?
-
@xxbedo101 said in how can i add spoiler or roof in my car like using los santos custom:
hi
how can i add spoiler or roof in my car like using los santos custom ?First get the vehicle you want to apply the mod changes to, e.g:
Vehicle currentVehicle = Game.Player.Character.CurrentVehicle;
Then install a modkit on the vehicle:
currentVehicle.Mods.InstallModKit();
Then you can call each individual modtype and set a new index like so:
currentVehicle.Mods[VehicleModType.Spoiler].Index = 3;
You can see a full example here:
https://github.com/KimonoBoy/SHVDNTutorial-Nuclei
However it might be hard to understand the code, until the associated Wiki is complete.