Vehicle Names
TMC pulls all vehicle information directly from the META files in order to reduce the amount of work it takes to add cars to the server. No need to maintain long lists of vehicle information.
The benefit of this is that vehicles made for the TMC framework can be dropped in with little to no changes needed and they will all work like base-game vehicles.
Adding a vehicle resource
Adding a vehicle to TMC is as simple as dropping it into the resources folder and managing it like you would with any other vehicle or server. You can decide how you structure this and where your files go, if you want a single resource or a pack of cars, etc. There are no limitations by the TMC framework
Configuring Vehicle & Brand Names
If your vehicle appears in the garages, phone, etc as NULL
you will need to configure the vehicle names and brand. This can be done in any Lua file and can be stored anywhere. We usually recommend 1 file per vehicle resource (so a pack of vehicles would contain 1 Lua file with all names in it).
In the vehicles.meta
file you'll find the following 2 entries:
You'll need to create game definitions for what these are supposed to mean. An important thing to note is that the spawncode/gameName MUST be 8 characters or less. To create the names & labels it's as simple as adding the following to a Lua file:
If multiple cars use the same brand you will only need to add the entry once. You also do not need to copy the Citizen.CreateThread
for each vehicle. Let's have a look what a couple real cars would look like added to the file we've already created:
We do not recommend using real cars within your FiveM server. This is purely an example.
Last updated