Skip to Content

Inside GTAV, Ped drawable components and props are stored in named groups called collections. Previously, collections were unavailable for FiveM users and drawable components/props were indexed through a global index that changes on every Title Update (TU).

The new collection-based natives keep indexes stable across TUs.

How Drawable Indexing Works

Think of collections as buckets placed one after another. Each collection is named and contains multiple drawables.

Example:

Collection""female_freemode_beachcustom_collection
Local indexes0, 10, 1, 2, 30, 1, 2
Global indexes0, 12, 3, 4, 56, 7, 8

When a TU adds new DLC collections, custom collections shift. Collection-based indexes remain stable.

New Natives

General Info

Conversion Between Global and Local Indexing

Collection-Based Alternatives to Existing Natives

Old (global)New (collection-based)
SET_PED_COMPONENT_VARIATIONSET_PED_COLLECTION_COMPONENT_VARIATION
SET_PED_PROP_INDEXSET_PED_COLLECTION_PROP_INDEX
GET_NUMBER_OF_PED_DRAWABLE_VARIATIONSGET_NUMBER_OF_PED_COLLECTION_DRAWABLE_VARIATIONS
GET_NUMBER_OF_PED_PROP_DRAWABLE_VARIATIONSGET_NUMBER_OF_PED_COLLECTION_PROP_DRAWABLE_VARIATIONS

Example: List All Collections

function printFullCollectionsInfo(ped) local collectionsCount = GetPedCollectionsCount(ped) print(string.format("Found %d collections", collectionsCount)) for i = 0, collectionsCount - 1 do local collectionName = GetPedCollectionName(ped, i) print(string.format("Collection %d: %s", i, collectionName)) end end RegisterCommand('PrintCollections', function(source) printFullCollectionsInfo(PlayerPedId()) end, true)

Example: Set Ped Look Using Collections

function setLook(ped) -- Head from base game collection (empty string), local index 27 SetPedCollectionComponentVariation(ped, 0, '', 27, 0, 0) -- Pants from mpHeist DLC collection, local index 9, texture 3 SetPedCollectionComponentVariation(ped, 4, 'female_heist', 9, 3, 0) -- Hat from mpBiker DLC collection SetPedCollectionPropIndex(ped, 0, 'mp_f_bikerdlc_01', 0, 0, false) end RegisterCommand('SetLook', function(source) setLook(PlayerPedId()) end, true)

Benefits of Collection-Based Natives

  1. Stable across TUs: Global indexes shift when Rockstar adds DLC collections
  2. Future-proof: Server won’t break on game updates
  3. Easier maintenance: No need to update custom component indexes after updates