Skip to main content
TRACK A·ADD CONTENT·Verified June 2026 · Lua 5.4 · ox_lib 3.x
Learning with an AI assistant?
Copies this lesson plus 2026 ground rules (no lua54 'yes', Cfx.re Portal, correct callback signatures) as a ready-to-paste mentor prompt.

Stream add-on peds and custom characters

Custom peds bring your server to life - police officers, shopkeepers, gang members, unique NPCs. The streaming pattern is simpler than vehicles (fewer metadata files), but there is one rule that trips people up: without a registered peds.meta, the ped commonly spawns invisible or T-posed and loses its component variations.

You'll build
An add-on ped resource with custom model, textures, and peds.meta, ready to spawn by model name.
Time
~20 minutes
You need
A local FiveM server, an add-on ped download (.yft/.ytd files), and basic fxmanifest knowledge.
You'll learn
Ped asset types, the ped streaming pattern, registering peds.meta, and spawning a custom ped by model name with a trainer.
BEFORE YOU START

Build it

Prepare the resource

The ped files are in the right place.
code
resources/my_ped/
fxmanifest.lua
peds.meta
stream/
ped_model.yft
ped_model.ytd
ped_model.ydd

Ped files typically include the model (.yft), the textures (.ytd), and often a drawable dictionary (.ydd). The reliable, documented add-on method also needs a peds.meta registered in the manifest. A bare .yft/.ytd sometimes loads, but without peds.meta the ped commonly spawns invisible or T-posed and is missing its component variations. Register peds.meta unless you are replacing a GTA ped by exact model name.

Write fxmanifest and register the ped

The ped model is streamed and known to the game.
code
fx_version 'cerulean'
game 'gta5'

files {
'peds.meta',
'stream/*.yft',
'stream/*.ytd',
'stream/*.ydd',
}

data_file 'PED_METADATA_FILE' 'peds.meta'

The stream/ files auto-register and PED_METADATA_FILE registers peds.meta, so the game knows about your ped's model and its component variations. The model name is the .yft filename without its extension (for example ped_model.yft gives the model name ped_model).

Spawn and test

The ped appears in-game.

Spawn and test the ped with a trainer or an in-game admin menu, using the model name from your .yft file (for example ped_model). No code needed.

Keep reading the full lesson

Sign in to start, then unlock every step of this lesson and the full FiveM School with a membership.

Still ahead in this lesson
  • Common failures

The remainder of Stream add-on peds and custom characters is available to FiveM School members.