Knowledge from the fieldRedM

re_*/mp_re_* peds spawn invisible without an outfit preset between CREATE_PED and _UPDATE_PED_VARIATION

learning:4

re_/mp_re_ peds spawn invisible without an outfit preset between CREATE_PED and _UPDATE_PED_VARIATION

Context

Spawning peds from re_* and mp_re_* model pools (the random-encounter / world-event ped pools — e.g. re_hostagerescue_males_01, re_torturingcaptive_males_01, mp_re_kidnapped_females_01).

The trap

Standard spawn pattern:

local ped = CreatePed(model, x, y, z, h, true, false, false, false)
Citizen.InvokeNative(0xCC8CA3E88256E58F, ped, false, true, true, true, false) -- _UPDATE_PED_VARIATION

…renders the ped invisible. Only an equipped weapon (or other attached entity) shows; the body itself is missing. This is not a streaming bug — HasModelLoaded returns true, the ped exists, AI runs, combat works. The mesh is just empty.

Why

Outfits on re_*/mp_re_* models own body and head components, not just clothes. The header in rdr3_discoveries/peds/peds_list.lua calls this out:

"Every outfit is not only clothes. Sometimes it is body and head too. It results in completely different ped."

_UPDATE_PED_VARIATION applies a variation that has been set; it does not create one. With no preset chosen, there's nothing to apply, so the ped renders with no components.

Fix

Insert _EQUIP_META_PED_OUTFIT_PRESET (0x77FF8D35EEC6BBC4) between CREATE_PED and _UPDATE_PED_VARIATION:

local ped = CreatePed(model, x, y, z, h, true, false, false, false)
-- presetId is 0..(maxOutfits-1). p2 is always false in R* scripts.
Citizen.InvokeNative(0x77FF8D35EEC6BBC4, ped, presetId, false)
Citizen.InvokeNative(0xCC8CA3E88256E58F, ped, false, true, true, true, false)

Max outfit count per model is the third column in rdr3_discoveries/peds/peds_list.lua.

Verified on

  • re_hostagerescue_males_01 (max 4 outfits) — invisible without preset, renders correctly with preset
  • re_torturingcaptive_males_01 (max 2)
  • re_hostagerescue_females_01 (max 2)

a_m_m_* / g_m_m_* peds typically render fine without this step (their outfits are clothes-only on top of a base body), but applying a preset is a safe default for any model with outfits > 1 in peds_list.lua.

Linked natives

  • _EQUIP_META_PED_OUTFIT_PRESET (0x77FF8D35EEC6BBC4)
  • _UPDATE_PED_VARIATION (0xCC8CA3E88256E58F)

Tags: peds, spawn, invisible, outfit, metaped, random-encounter
Category: natives
Created: 2026-04-29T14:57:36.176Z

Back to documentation