[How-to] Add Car Parts from Add-on Vehicles to your server

How to add Add on Vehicle parts to your server

Adding cars itself isn’t difficult, and even putting them in a pack is quite easy if you use
a merger tool of some sorts.

However when i tried to modify my add-on cars in Los Santos Customs, All those sweet parts weren’t showing up.

I missed a step. Being lazy, i couldn’t find a guide to follow when i tried adding add-on cars and their custom parts to our server (Unity)
Essentially, you have to get the hexes for all the parts you are adding to the game.

For this i used the following Tools:

  1. OpenIV
  2. Notepad++ (yes… i know)

In the example i am about to show you i have used a car that has a few parts,
but i am treating it as one that has many.

Step 1.
Navigate to the in .dlc folder where the parts are located
Right click without having a file selected and select copy file list.

Step 2.


Make your life easy, and remove .yft extensions

Step 3.
Step4
In OpenIV click on Tools and select “Hash Generator”

Step 4


Copy paste the filenames (without extensions) into the input field.
Add the filename of the vehicle itself.
On the bottom select Hex and Case Sensitivity.
When you hit generate, the output field will give you the hex values.

Step 5.


Create a file “vehicle_names.lua” and place it in your resource

In here type:

function AddTextEntry(key, value)
Citizen.InvokeNative(GetHashKey(“ADD_TEXT_ENTRY”), key, value)
end

Citizen.CreateThread(function()
AddTextEntry(‘0xFAA9DCEC’, ‘Ferrari 599 GTO’)
AddTextEntry('HEX CODE ', ‘PART NAME’)
AddTextEntry('HEX CODE ', ‘PART NAME’)
AddTextEntry('HEX CODE ', ‘PART NAME’)
AddTextEntry('HEX CODE ', ‘PART NAME’)
AddTextEntry('HEX CODE ', ‘PART NAME’)
AddTextEntry('HEX CODE ', ‘PART NAME’)
end)

The part names can be whatever you want them to be. I usually use generic names like Bonnet 1 or Skirt A

Step 6.
Step7
In your __resource.lua

add:
client_script {
‘data/vehicle_names.lua’
}

(Point it to the location that you have placed the file)

Step 7.
Start the resource, spawn your vehicle and mod your car at the garage.

Obviously when there aren’t as many resources in the dlc file, you would do it
by hand. But some have a ton of parts, and manually copying all the filenames gets
boring, and personally i’m prone to typing errors.

I hope this helps those that came across the same problem as me. There is probably
a much better Tutorial out there. But like i said, i couldn’t find one in the first minute
so i gave up.

4 Likes

You should refrain from posting your discord. One as it is not relevant to the topic at all. Two as its stated here for advertising in releases, really still applies here:

Edited… didn’t really think about it tbh. But you are right.

Streamlined the process by removing a step

can I just ask, I have read through this tutorial and would like to ask 1. what script are you modifying you don’t say where this goes ? and 2. in here is where exactally do you mean Create a file “vehicle_names.lua” and place it in your resource

still doesn’t work name comes up as null in tunershop

Nice tutorial :slight_smile: But i have this problem with the nissan gtr add-on cause when i start the server the car will always be black when i spawn it and in lscustoms i cant see any of the car parts. But when i restart gtr resource then the gtr will always spawn orange colored. And then all the car parts will works but they have no name, its just saying NULL under all categorys :frowning: Do you maybe know how to fix ? :smiley:

Don’t like to resurrect old threads but I am still having issues adding car parts I have done everything in your tutorial and it still fails?

I have the same problem, someone knows how to solve

Hash generator don’t give good Hex, have try with a fonctionnal Addon Mod part and he do’nt give me the same code ! So i can’t do anything without a good hexcode… Help ?

does this work when spawn /car ?
or just from the garage?

Make sure the file is in OPENIV before doing the hash generator