Turtles

then your doing something wrong post a copy of your vehicles.meta

vehicles.meta (5.8 KB)

1 Like

Citizen.CreateThread(function()
AddTextEntry(‘0x0C603EAD’, ‘car name’)
end)

should be it if not list your __resource.lua

Should i put that code in vehicles.meta or vehicles name ?

Here is my resource.lua

I will try delete function AddTextEntry(key, value)
Citizen.InvokeNative(GetHashKey(“ADD_TEXT_ENTRY”), key, value)
end

Resource Lua :

resource_manifest_version ‘77731fab-63ca-442c-a67b-abc70f28dfa5’

files {
‘vehicles.meta’,
‘carvariations.meta’,
‘carcols.meta’,
‘handling.meta’,
‘vehiclelayouts.meta’, – Not Required
}

data_file ‘HANDLING_FILE’ ‘handling.meta’
data_file ‘VEHICLE_METADATA_FILE’ ‘vehicles.meta’
data_file ‘CARCOLS_FILE’ ‘carcols.meta’
data_file ‘VEHICLE_VARIATION_FILE’ ‘carvariations.meta’
data_file ‘VEHICLE_LAYOUTS_FILE’ ‘vehiclelayouts.meta’ – Not Required

client_script ‘vehicle_names.lua’

it should go in your vehicle_names.lua

I will try now

Yep still not working man this suck!

You have Put it in your __resource.lua as a client_script correct?

Yes client_script ‘vehicle_names.lua’

and specified your resource_manifest_version?

yep resource_manifest_version ‘77731fab-63ca-442c-a67b-abc70f28dfa5’

Replace with this one:

resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'

can you upload your car package somewhere so i can play about with it

motapsp.rar (16.1 MB)

Anyone can replay a tutorial step by step, please? Because I follow all you steps in this topic…and its not working, so I think I’m loosing something.

And I have a few question, where I find Hash key of my car?

For me, its not working the next line:

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

So I have to use this:
AddTextEntry(‘0x48871FD2’, ‘Audi R8’)

But like I said…its not working.

Thanks guys

did you fix it ?

im having the same issue i dont get where you identify the vehicles???
like in garage folder or somewhere else ??

To give them the names you need to specify them as we went over above using either the vehicle hash or other means.

If you look above at my other messages they should help you.

1 Like

Lets make this easy. Create a file in your addon vehicle folder named vehicle_names.lua. Add the following to the file:

function AddTextEntry(key, value)
	Citizen.InvokeNative(GetHashKey("ADD_TEXT_ENTRY"), key, value)
end
Citizen.CreateThread(function()
    AddTextEntry('A8', 'Audi A8') -- Enter Gamename from vehicles.lua and what you want it to display.
    AddTextEntry('r8ppi', 'Audi R8 PPI Razor GTR')
    AddTextEntry('Rs4avant', 'Audi RS4')
    AddTextEntry('s5', '2017 Audi S5')
    AddTextEntry('RS5C', 'Audi RS5 Coupe')
    AddTextEntry('SQ72016', 'Audi SQ7')
    AddTextEntry('rs3', '2018 Audi RS3 Sportback')
end)

Replace the shortnames with the gameName found in your vehicles.meta file

<gameName>r8ppi</gameName>

Now add the following to the end of your __resource.lua file

client_script {
    'vehicle_names.lua'
}

And a big Thank you to Ultrunz for helping me with this!!

4 Likes

I was able to do this with 3 of my addon cars, but there is one I can’t seem to get working. I have searched high and low and tried everything posted above, but I’m still unable to get it to work. It’s a car I would really like to put on my server, but if it just shows up as null in garage, that kind of ruins it. Anyone have a suggestion on getting cars stuck on null to work?