⚙️
TMC v2 Core
DiscordWebsite
  • Get Started
  • TMC Core Object
    • Client Functions
      • Vehicle Functions
      • Interaction Ped Functions
      • Interaction Object Functions
      • Interaction Prompts
      • Polyzones
    • Client Menus
    • Events
      • Client
      • Server
    • Server Functions
      • General Functions
      • Commands
      • Player Functions
    • Common Functions
    • 🚘Vehicle Names
  • Object Models
    • Job
  • 📄Other Resources
    • ✨Status Effects
    • 📤Dispatch
    • 🫂Parties
    • 💶Banking
    • 🔍Evidence
Powered by GitBook
On this page
  • Adding a vehicle resource
  • Configuring Vehicle & Brand Names
  1. TMC Core Object

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:

<gameName>testcar</gameName>

<vehicleMakeName>TESTBRAND</vehicleMakeName>

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:

vehiclenames.lua
Citizen.CreateThread(function()
    -- gameNames
    AddTextEntry('testcar', 'Model Name')
    
    -- makeNames/brand names
    AddTextEntry('TESTBRAND', 'Brand Name')
end)

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:

vehiclenames.lua
Citizen.CreateThread(function()
    -- gameNames
    AddTextEntry('testcar', 'Model Name')
    AddTextEntry('fiestast', 'Fiesta ST')
    AddTextEntry('mstgt500', 'Mustang GT500 Fastback')
    
    -- makeNames/brand names
    AddTextEntry('TESTBRAND', 'Brand Name')
    AddTextEntry('FORD', 'Ford')
end)

We do not recommend using real cars within your FiveM server. This is purely an example.

PreviousCommon FunctionsNextJob

Last updated 6 months ago

🚘