Understanding Clothing Components in FiveM (CUSTOM CLOTHING)

Understanding Clothing Components in FiveM

FiveM uses a component-based system to define different parts of a player's clothing. Each clothing item is defined by a component ID, drawable variation, and texture variation. Here’s a breakdown of the components:

  • Component ID: This is a number that represents a specific part of the clothing, such as tops, pants, shoes, etc.

  • Drawable Variation: This is a number that represents a specific model or variant of the component.

  • Texture Variation: This is a number that represents the texture of the drawable variation.

Common Component IDs

Here are some commonly used component IDs:

  • 1: Mask

  • 3: Upper Body (Arms)

  • 4: Lower Body (Pants)

  • 5: Bag/Parachute

  • 6: Shoes

  • 7: Accessories

  • 8: Undershirt

  • 9: Body Armor

  • 10: Decals

  • 11: Tops (Jackets, Shirts, etc.)

How to Find Clothing Component Variations

To find the component variations, you can look at the clothing files provided by the clothing resource you're using (such as EUP, custom clothing packs, etc.). These files typically contain configurations for drawable and texture variations.

Step-by-Step Guide

  1. Locate the Clothing Files: Find the folder where your clothing files are stored. This is often within a resource like eup-stream, mp_freemode_01, or similar.

  2. Examine the File Structure: Inside these folders, you will find .ymt files or .meta files that define the drawable variations. You may also find texture files (.ytd).

  3. Identify Drawable Variations: Open these files in a text editor or use a tool like OpenIV to view them. Look for sections that define the drawable variations.

Example of a Clothing File Structure

Here is a simplified example of what you might see in a .ymt or .meta file:

<Item>
    <PedComponentIndex>11</PedComponentIndex> <!-- Component ID for Tops -->
    <DrawableId>15</DrawableId> <!-- Drawable Variation -->
    <TextureId>0</TextureId> <!-- Texture Variation -->
</Item>
<Item>
    <PedComponentIndex>8</PedComponentIndex> <!-- Component ID for Undershirts -->
    <DrawableId>59</DrawableId> <!-- Drawable Variation -->
    <TextureId>0</TextureId> <!-- Texture Variation -->
</Item>

In this example, PedComponentIndex represents the component ID, DrawableId represents the drawable variation, and TextureId represents the texture variation.

Using Component Variations in Config

Once you have identified the drawable variations for the clothing items, you can define them in your config.lua file. Here’s how you can do that:

Config.UnsuitableClothing = {
    EXTREME_HEAT = {
        {component = 11, drawable = 15}, -- Example: Top with drawable 15
        {component = 8, drawable = 59},  -- Example: Undershirt with drawable 59
        -- Add more as needed
    },
    EXTREME_COLD = {
        {component = 11, drawable = 11}, -- Example: Top with drawable 11
        {component = 4, drawable = 21},  -- Example: Lower body with drawable 21
        -- Add more as needed
    }
}

Last updated