Import Vehicles

circle-check

Addon Vehicles

If you're importing addon vehicles, make sure FiveM knows how they're named. To do this, go to client/editable/vehnames.lua and add each vehicle's spawn name and label to the myAddonVehicles table.

triangle-exclamation

Import Panel

  • Model Name: Use this field to specify the exact vehicle model to import when adding new vehicles to your server.

  • Import All Vehicles: Imports all vehicles from your server. This process may take a few minutes, depending on your PC's performance.

circle-exclamation
Process starting..
Process ended.

Missing Assets

This print can mean the following:

  • You have some addon vehicles folder where one of the vehicles.meta file have registered vehicles that does NOT exist in your server, meaning the .yft files are missing.

  • If importing a single vehicle, you entered one that does not exist in your server files.

Solution:

  • You can either ignore the warning and continue, or edit your vehicles.meta file to find and remove the missing vehicle entry.

Custom Imports

circle-info

This import functions can be found in client/editable/_framework.lua

The following functions allow you to import vehicle lists from any external script or database table:

getFrameworkVehicles()

This function retrieves all vehicles from your Framework. To import from a custom script or database, you must generate and return a table where each vehicle adheres to the following structure:

  • model:hash The vehicle model hash

  • name:string Vehicle model name

  • class?:string Vehicle class

  • brand?:string Vehicle brand name

  • category?:string Vehicle category (suv, sports, super....)

  • price?:number Vehicle base price

getVehicleInfo()

This function retrieves data for a single vehicle from the Framework. For custom integrations, you must return a single table (not an array) matching the structure below:

  • model:hash The vehicle model hash

  • name:string Vehicle model name

  • class?:string Vehicle class

  • brand?:string Vehicle brand name

  • category?:string Vehicle category (suv, sports, super....)

  • price?:number Vehicle base price

Last updated