Skip to Content
ScriptingAsset Streaming (Cars, Maps)

Asset Streaming (Cars, Maps)

FiveM allows you to stream custom assets (models, textures, data files) from the server to the client automatically. This feature is what allows servers to have custom cars, clothes, weapons, and maps.

Resource Structure

To stream assets, you need a standard resource structure with a stream folder.

my-car-pack/ ├── fxmanifest.lua # Resource manifest ├── stream/ # ALL assets go here (yft, ytd, ydr, ymap) │ ├── adder.yft │ ├── adder.ytd │ └── ... ├── data/ # Optional: data files (handling.meta, vehicles.meta) │ ├── handling.meta │ └── vehicles.meta └── client.lua # Optional: scripts

The stream Folder

Any file placed inside the stream/ folder is automatically scanned by FiveM.

  • No definition needed: You do NOT need to list files inside stream/ in your fxmanifest.lua.
  • Automatic loading: FiveM detects the file type (texture, model, map) based on the extension (.ytd, .yft, .ymap) and loads it.

Streaming Vehicles

To add a custom vehicle, you typically need the model files and the data configuration files.

  1. Models: Put .yft (model) and .ytd (texture) files in the stream/ folder.
  2. Data: Put handling.meta, vehicles.meta, and carcols.meta in a data/ folder (organization preference).
  3. Manifest: You MUST tell FiveM about the data files in fxmanifest.lua.

fxmanifest.lua for Vehicles

fx_version 'cerulean' game 'gta5' -- List the data files files { 'data/vehicles.meta', 'data/carcols.meta', 'data/handling.meta', } -- Tell the game to load them as specific data types data_file 'HANDLING_FILE' 'data/handling.meta' data_file 'VEHICLE_METADATA_FILE' 'data/vehicles.meta' data_file 'CARCOLS_FILE' 'data/carcols.meta'

Streaming Maps (MLO/YMAP)

Streaming maps is even easier.

  1. Create a resource folder (e.g., custom_map).
  2. Create a stream/ folder inside it.
  3. Drop your .ymap (map placement) and .ydr/.ytyp (models/definitions) files into stream/.
  4. Create a basic fxmanifest.lua.

fxmanifest.lua for Maps

fx_version 'cerulean' game 'gta5' this_is_a_map 'yes'

The this_is_a_map 'yes' directive helps FiveM optimize the loading of the map, especially for large MLOs or interiors.

Streaming Clothing (EUP)

Clothing works similarly to vehicles but uses ped data files.

  1. Put .ydd, .ytd files in stream/.
  2. Often, clothing packs are large, so you might see stream/mp_m_freemode_01/....
  3. Ensure you are not exceeding the 16MB physical limit for a single file, or players will crash.

Optimization Tips

1. Texture Optimization (YTD)

  • Oversized Textures: Textures larger than 2048x2048 cause massive “texture loss” (city blinking/disappearing) for players with lower VRAM.
  • Compression: Always compress your textures. Reduce unused alpha channels.
  • Split Dictionaries: If a .ytd file is >10MB, try to split it or reduce quality.

2. Poly Count (YFT/YDR)

  • High polygon models (>200k polys) can cause game instability and FPS drops.
  • Use “LODs” (Level of Detail) models so the high-quality version only renders when close.

3. Resource Splitting

  • Don’t put 500 cars in one single resource. If you need to update one car, the client has to re-verify the entire pack.
  • Group assets logically: police-fleet, civ-cars-pack1, custom-map-legion.

Common Data File Types

FileDirective in fxmanifestPurpose
handling.metaHANDLING_FILEVehicle physics, speed, turning.
vehicles.metaVEHICLE_METADATA_FILEVehicle models, audio, textures.
carcols.metaCARCOLS_FILESiren lights, mod kit IDs.
carvariations.metaVEHICLE_VARIATION_FILEVehicle paint jobs, spawning rules.
weaponarchetypes.metaWEAPON_ARCHETYPES_FILECustom weapon definitions.
Last updated on