GetPedCollectionName
Docslocal retval = GetPedCollectionName(ped, index)Description
Returns name of collection under given index for the given Ped.
Collections are groups of drawable components or props available for the given Ped. Usually collection corresponds to a certain DLC or the base game. See SET_PED_COLLECTION_COMPONENT_VARIATION, SET_PED_COLLECTION_PROP_INDEX, GET_NUMBER_OF_PED_COLLECTION_DRAWABLE_VARIATIONS etc natives for more details on how to work with collections.
GET_PED_COLLECTION_NAME can be used together with GET_PED_COLLECTIONS_COUNT to list all collections attached to Ped.
Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | The target ped |
index | int | The target collection index |
Quick Snippet: Get Ped Handleped
pedUse this to get the player ped handle for this native.
-- Get the player's ped handle (client-side)
local ped = PlayerPedId()
print("Ped handle: " .. ped)
-- For a specific player's ped (server-side):
-- local targetPed = GetPlayerPed(source)Ped Models

mp_m_freemode_01
player_zero
ig_agatha
s_m_y_cop_01
s_m_m_gaffer_01
g_m_m_armboss_01
a_c_boar
a_m_m_bevhills_01Returns
char*Examples
Official
local ped = PlayerPedId()
local count = GetPedCollectionsCount(ped)
for i = 0, count - 1 do
print(GetPedCollectionName(ped, i))
end