Skip to Content
ScriptingAssets & Streaming
Report an error
Open in ChatGPTOpen in Claude

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.
⚠️

FiveM for GTA V Enhanced: when a resource contains a stream_enhanced/ folder, Enhanced loads it instead of stream/. Without it, stream/ still works on Enhanced but is deprecated. Keep Gen8 assets in stream/ and Gen9-converted assets in stream_enhanced/ to ship one resource for both platforms. See Legacy vs Enhanced and Enhanced migration.

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'

this_is_a_map 'yes' marks the resource as a GTA map so the map storage is reloaded when the resource loads. Use it for resources that ship .ymap placements.

Streaming Clothing (EUP)

Add-on clothing needs more than streamed drawables. The drawables (.ydd) and textures (.ytd) go in stream/, together with the collection’s .ymt, and the shop metadata that registers the collection must be mounted as a data file:

files { 'mp_m_freemode_01_mycollection.meta' } data_file 'SHOP_PED_APPAREL_META_FILE' 'mp_m_freemode_01_mycollection.meta'

The file and collection names must match what your clothing tool generated. Select add-on drawables at runtime with the collection-based natives rather than hard-coded global drawable indices, which shift when other packs load.

Optimization Tips

1. Read FXServer’s oversized-asset warnings

When a resource starts, FXServer checks every streamed resource file’s physical and virtual memory size (not its size on disk) and prints:

Asset my-car-pack/adder.yft uses 22.4 MiB of physical memory.

Warnings start above 16 MiB and escalate above 32 MiB and 64 MiB. Above 48 MiB the message adds “Oversized assets can and WILL lead to streaming issues (such as models not loading/rendering)”. Treat any warning as the signal to reduce texture resolution, compress textures or split the asset; there is no fixed size at which a client is guaranteed to crash.

2. Textures and geometry

  • Compress textures and drop alpha channels you do not use. High-resolution textures are the most common cause of oversized .ytd files.
  • Provide LOD models so the full-detail mesh only renders up close. See collision and LOD diagnosis.
  • Measure on a low-VRAM client instead of trusting a polygon budget; see asset performance.

3. Resource Splitting

  • Group assets logically (police-fleet, civ-cars-pack1, custom-map-legion) so you can update, restart or remove one set without touching the others.

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.
weapons.metaWEAPONINFO_FILEWeapon definitions.
weaponarchetypes.metaWEAPON_METADATA_FILEWeapon model archetypes.
mp_m_freemode_01_*.metaSHOP_PED_APPAREL_META_FILEAdd-on clothing collections.

The complete list of mount types is in the data file reference.