Vehicle_names.lua

This is how you solve the problem that stands at the auto NULL despite that you have the vehiclenames.lua

How to fix the NULL with Vehicle.names.lua

Go into your car files 
Search the vehicle.meta
go into it

Search this part 
<gameName>NGT19</gameName>
      <vehicleMakeName>NGT19</vehicleMakeName>

The text in the middle is the name you have to put in your vehicle_names.lua
You can edit the middle to whatever you want

When it doesn’t work message me but for me it works

How to make a Vehicle_names.lua
make an client.lua an paste

Citizen.CreateThread(function()

AddTextEntry(‘spawn name’, ‘Car name real’)

and don’t vorget to make an __resource.lua

Dont forget to see NGT19
NGT19
This two things must be the same and this things have to be in the vehicle_names.lua (NGT19) is the vehicle model name for every car it is an other
IMPORTANT: I dont know why but for me i have to write the name in Caps

client.lua (4.7 KB)
__resource.lua (42 Bytes)

3 Likes

Hello,

thank you very much for your tutorial. :wink:

Do you have a vehicle_names.lua for download?
I have no idea how to write this.

Greetings

I can’t get the files to work, there is still NULL everywhere for the cars.

Thanks anyway :slight_smile:

2 Likes

I have tried everything… it still shows NULL for the vehicles

__resource.lua:

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

files {
‘data/vehicles.meta’,
‘data/carcols.meta’,
‘data/carvariations.meta’,
‘client.lua’
‘vehicle_names.lua’
}

data_file ‘VEHICLE_METADATA_FILE’ ‘data/vehicles.meta’
data_file ‘CARCOLS_FILE’ ‘data/carcols.meta’
data_file ‘VEHICLE_VARIATION_FILE’ ‘data/carvariations.meta’

client_scripts {

'client.lua'
'vehicle_names.lua'

}

client.lua:
AddTextEntry(‘charger18leo’, ‘Ford Charger’)

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

Citizen.CreateThread(function())
AddTextEntry(‘charger18leo’, ‘Ford Charger’)
end)

vehicles.meta:
modelName charger18leo
txdName charger18leo
handlingId charger18leo
gameName charger18leo

2 Likes

Oversize modelname, make sure you have 11 characters max in the “key” entry. In your case, just cut off the last letter to make it 11 and it should work. I don’t know why it’s this way, but it worked for me in the past lol


To the OP - weird text formatting, fix it up using proper blocks. Also, you only need the gameName of a vehicle to input as the key value last I checked, and the handlingId could be a different name from the vehicle’s modelName or gameName, so be sure to correct that part to avoid confusing people.

So I changed the name now to CHARGER18 but it doesn’t work.

can you show me your vehicle_names.lua

This is already in the post above, but happy to reiterate here:

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

Citizen.CreateThread(function())
AddTextEntry(‘charger18leo’, ‘Ford Charger’)
AddTextEntry(‘police4’, ‘Ford Charger’)
end)

und schick mir mal bitte die vehicle.meta von einem der autos

Und ich benutze nen Übersetzer… :joy:

Hier die Datei :wink:

vehicles.meta (29.4 KB)

vehicles.meta (29.4 KB)
Probiere mal diese, die müsste gehen

CHARGER18

Das muss in die vehicle_names.lua

Funktioniert leider nicht

client.lua (76 Bytes)
__resource.lua (42 Bytes)

Benutze das mal als vehicle_names und vergiss es nicht zu starten

Und das Auto zu restarten und refresh nicht vergessen

Also ich hab auch den Server neu gestartet… geht nicht

Dafür gibts diesen netten Fehler:
Could not parse resource metadata file C:/FiveM/***/resources//[cars]/[LSPD]/LSPD_Charger18/__resource.lua: …e/resources//[cars]/[LSPD]/LSPD_Charger18/__resource.lua:8: ‘}’ expected (to close ‘{’ at line 3) near ‘‘vehicle_names.lua’’

Jetzt haben wir wohl zu viel probiert :joy:

client.lua (76 Bytes)
__resource.lua (26 Bytes)
Versuch es mal mit dem

Jetzt funktioniert es :+1: :grinning:

Nur die Server Konsole hatte folgendes gemeldet:
[ citizen-server-impl] Some resources have an outdated resource manifest:
[ citizen-server-impl] - LSPD_Charger18
[ citizen-server-impl]
[ citizen-server-impl] Please update these resources.

Ja das ist aber eigentlich egal ich hoffe ich konnte dir helfen

Ja vielen Dank für deine Hilfe :wink:
Jetzt brauche ich nur die anderen Wagen einzutragen :slight_smile:

Danke Dir :wink:

1 Like

Ja ist ein bisschen viel arbeit alle Autos einzutragen aber wenn man sich mal 1 Stunde hinsetzt klappt das Schnell

Ja das ist kein Problem, ein Server macht nun mal Arbeit :slight_smile:

Was hattest du eigentlich bei der vehicles.meta geändert?
Nicht das ich bei den anderen Fahrzeugen da auch was ändern muss und nicht weis, was.