FiveM Docs / Native Reference
API Set:
  • all
  • server
  • client
Language:
  • raw
  • lua
  • c#
  • js
Namespace: CFXAPI set: clientGame: gta5editImprove

GET_PED_COLLECTION_NAME_FROM_DRAWABLE

0xD6BBA48B
// GetPedCollectionNameFromDrawable
char* GET_PED_COLLECTION_NAME_FROM_DRAWABLE(Ped ped, int componentId, int drawableId);
Parameters:
  • 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.

Returns:

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.

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.

Examples:

  • 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)
Privacy
•
Cookie Policy
•
Cookie Settings
0x7241CCB7D020DB69(Entity entity, BOOL toggle)
0x7ECDF98587E92DEC(Any p0)
0x82EBB79E258FA2B7(Entity entity, int interiorID)
0x9E6542F0CE8E70A3(BOOL toggle)
0xAF348AFCB575A441(char* roomName)
Namespace: ITEMSET
ADD_TO_ITEMSET(Any p0, Any p1)
CLEAN_ITEMSET(Any p0)
CREATE_ITEMSET(BOOL distri)
DESTROY_ITEMSET(Any p0)
GET_INDEXED_ITEM_IN_ITEMSET(Any p0, Any p1)
GET_ITEMSET_SIZE(ScrHandle x)
IS_IN_ITEMSET(Any p0, Any p1)
IS_ITEMSET_VALID(Any p0)
REMOVE_FROM_ITEMSET(Any p0, Any p1)
Namespace: LOADINGSCREEN
_LOADINGSCREEN_GET_LOAD_FREEMODE()
_LOADINGSCREEN_GET_LOAD_FREEMODE_WITH_EVENT_NAME()
_LOADINGSCREEN_IS_LOADING_FREEMODE()
_LOADINGSCREEN_SET_IS_LOADING_FREEMODE(BOOL toggle)
_LOADINGSCREEN_SET_LOAD_FREEMODE(BOOL toggle)
_LOADINGSCREEN_SET_LOAD_FREEMODE_WITH_EVENT_NAME(BOOL toggle)
0xF2CA003F167E21D2()
0xFA1E0E893D915215(BOOL toggle)
Namespace: LOCALIZATION
GET_CURRENT_LANGUAGE()
_LOCALIZATION_GET_SYSTEM_DATE_FORMAT()
_LOCALIZATION_GET_SYSTEM_LANGUAGE()
Namespace: MISC
ABSF(float value)
ABSI(int value)
ACOS(float p0)
ACTIVITY_FEED_CREATE(char* captionString, char* condensedCaptionString)
_ADD_DISPATCH_SPAWN_BLOCKING_ANGLED_AREA(float x1, float y1, float z1, float x2, float y2, float z2, float width)
_ADD_DISPATCH_SPAWN_BLOCKING_AREA(float x1, float y1, float x2, float y2)