GetPedCollectionNameFromDrawable
клиент GET_PED_COLLECTION_NAME_FROM_DRAWABLE
c
char* GET_PED_COLLECTION_NAME_FROM_DRAWABLE(Ped ped, int componentId, int drawableId);Gets collection name for the given global drawable ID. Together with GET_PED_COLLECTION_LOCAL_INDEX_FROM_DRAWABLE is used to get collection and local index (inside the given collection) of the drawable. The collection name and index are used in functions like SET_PED_COLLECTION_COMPONENT_VARIATION.
Примеры
lua
local ped = PlayerPedId()
-- Top for mp_f_freemode_01. From female_freemode_beach collection under index 1.
-- Global index is 17 because there is 16 top variations in the base game collection that goes before the female_freemode_beach collection.
local name = GetPedDrawableCollectionName(ped, 11, 17)
local index = GetPedDrawableCollectionLocalIndex(ped, 11, 17)
-- Equivalent to SetPedComponentVariation(ped, 11, 17, 0, 0)
SetPedCollectionComponentVariation(ped, 11, name, index, 0, 0)Параметры
- ped: The target ped
- componentId: One of the components from SET_PED_COMPONENT_VARIATION
- drawableId: Global drawable ID. Same as set in SET_PED_COMPONENT_VARIATION. Global drawable ID points to drawables as if drawables from all collections for the given component are placed into one continuous array.
Возвращает
Name of the collection that the given global drawable ID corresponds to. Base game collection is an empty string. Returns null if Ped is not found or the global index is out of bounds.
Страница собрана автоматически из native-decls/GetPedCollectionNameFromDrawable.md. Нашли ошибку — поправьте исходный файл.