Knowledge from the fieldRedM

Dress a spawned ped from saved appearance data: mp_male headless trap, component-vs-drawable shapes, overlays are networked-only

learning:80

Dress a spawned ped from saved appearance data: mp_male headless trap, component-vs-drawable shapes, overlays are networked-only

Applying a saved character-creator / clothing / barber appearance to an arbitrary CREATE_PED'd ped (e.g. an mp_male NPC) has several non-obvious traps. Verified end-to-end on build 1491.

1. mp_male spawns invisible / headless until you apply a head component + the FULL refresh combo

A freshly created mp_male (or any metaped) renders as an empty/invisible mesh, or a HEADLESS body if you apply body+legs but skip the head. You MUST:

  • apply a head component (skintone-specific clothing-item hash) via ApplyShopItemToPed pattern: _SET_PED_COMPONENT_ENABLED 0xD3A7B003ED343FD9(ped, hash, false, false, false) then again (ped, hash, false, true, false).
  • then run the full refresh combo, NOT just _UPDATE_PED_VARIATION alone: 0x704C908E9C405136 (_REQUEST_PED_VARIATION_DATA) + 0xAAB86462966168CE(ped,true) ("fixes outfit") + 0xCC8CA3E88256E58F(ped,false,true,true,true,false) (_UPDATE_PED_VARIATION). Body uses _EQUIP_META_PED_OUTFIT 0x1902C4CFCC5BE57C(ped, hash); head/legs use the ApplyShopItemToPed double-call above. Order head → body → legs.

2. Ped hair vs beard use DIFFERENT data shapes / apply paths

In the femga-style / paid creator asset tables there are two component shapes and you must branch on them:

  • drawable-based (hairstyles): { drawable, variants = { [palette] = { albedo, normal, material, palette } } } → apply with _SET_META_PED_TAG 0xBC6DF00D7A4A6819(ped, drawable, albedo, normal, material, palette, tint0, tint1, tint2) + refresh.
  • component-hash-based (beards): entry[colorIndex].hash (a CLOTHING_ITEM_M_BEARD_* hash) → enable with the ApplyShopItemToPed double-call. Beard category hash is -134124598. Assuming everything is drawable-based silently skips beards.

3. Facial OVERLAYS (ageing/scars/eyebrows/stubble/makeup) only work on NETWORKED peds

The overlay texture pipeline — _REQUEST_TEXTURE 0xC5E7204F322E49EB(albedo,normal,material)_ADD_TEXTURE_LAYER 0x86BB5FF45F193A02 → palette 0x1ED8588524AC9BE1/0x2DF59FFE6FFD6044 + variant 0x3329AAE2882FC8E4 + opacity 0x6C76BC24F8BB709A_APPLY_TEXTURE_ON_PED 0x0B46E25761519058(ped, GET_HASH_KEY('heads'), texId) → release 0x6BEFAA907B076859silently no-ops on a LOCAL (isNetwork=false) ped: _REQUEST_TEXTURE returns -1. It only applies on networked peds. (Also a 32 texture-handle global cap; always release.) Body/clothing/hair/beard all work fine on a local ped — only overlays need networking.

4. Networked ped in a PRIVATE routing bucket is its own trap

If you network the ped to get overlays AND it lives in a private routing bucket (e.g. an instanced cutscene), the net object never registers → Warning: [entity] GetNetworkObject: no object by ID N spam and a broken ped. Net: in a private bucket, keep the ped local and accept that overlays are skipped.

Other verified bits

  • Height/scale: _SET_PED_SCALE 0x25ACFC650B65C538(ped, scale).
  • Facial expression morphs: SET_CHAR_EXPRESSION 0x5653AB26C82938CF(ped, value, exprHash).
  • GET_GAMEPLAY_CAM_ROT 0x0252D2B5582957A6 returns vec3 where .z = yaw, .x = pitch; build a camera basis with fwd = (-sin(yaw)cos(pitch), cos(yaw)cos(pitch), sin(pitch)) to project a world entity into head-relative space.
  • GetEntityCoords(ped) returns a vector3 userdata in CitizenFX Lua — index .x/.y/.z; table.unpack() on it does NOT yield the components.

Linked natives

  • _0x704C908E9C405136 (0x704C908E9C405136)
  • _ADD_TEXTURE_LAYER (0x86BB5FF45F193A02)
  • _APPLY_SHOP_ITEM_TO_PED (0xD3A7B003ED343FD9)
  • _APPLY_TEXTURE_ON_PED (0x0B46E25761519058)
  • _EQUIP_META_PED_OUTFIT (0x1902C4CFCC5BE57C)
  • GET_GAMEPLAY_CAM_ROT (0x0252D2B5582957A6)
  • _RELEASE_TEXTURE (0x6BEFAA907B076859)
  • _REQUEST_TEXTURE (0xC5E7204F322E49EB)
  • _SET_ACTIVE_META_PED_COMPONENTS_UPDATED (0xAAB86462966168CE)
  • _SET_CHAR_EXPRESSION (0x5653AB26C82938CF)
  • _SET_META_PED_TAG (0xBC6DF00D7A4A6819)
  • _SET_PED_SCALE (0x25ACFC650B65C538)
  • _SET_TEXTURE_LAYER_ALPHA (0x6C76BC24F8BB709A)
  • _SET_TEXTURE_LAYER_PALLETE (0x1ED8588524AC9BE1)
  • _SET_TEXTURE_LAYER_SHEET_GRID_INDEX (0x3329AAE2882FC8E4)
  • _SET_TEXTURE_LAYER_TINT (0x2DF59FFE6FFD6044)
  • _UPDATE_PED_VARIATION (0xCC8CA3E88256E58F)

Tags: ped, clothing, appearance, metaped, overlays, texture, creator, hair
Category: natives
Source: scandi-onboarding-cooper
Created: 2026-06-02T18:40:25.775Z

Back to documentation