_ADD_TEXTURE_LAYER
Adds a layer to the custom ped texture textureId using the given albedo, normal and material hashes, blend type and alpha, and returns the new layer index.
Used when building custom skin or overlay textures for MP-style peds.
Signature
int _ADD_TEXTURE_LAYER(int textureId, Hash albedoHash, Hash normalHash, Hash materialHash, int blendType, float texAlpha, int sheetGridIndex); // 0x86BB5FF45F193A02 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | textureId | int |
| 2 | albedoHash | Hash |
| 3 | normalHash | Hash |
| 4 | materialHash | Hash |
| 5 | blendType | int |
| 6 | texAlpha | float |
| 7 | sheetGridIndex | int |
Facts
| Name | _ADD_TEXTURE_LAYER |
|---|---|
| Hash | 0x86BB5FF45F193A02 |
| Namespace | |
| Returns | int |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result = Citizen.InvokeNative(0x86BB5FF45F193A02, -- _ADD_TEXTURE_LAYER
0, -- int textureId
GetHashKey("name"), -- Hash albedoHash
GetHashKey("name"), -- Hash normalHash
GetHashKey("name"), -- Hash materialHash
0, -- int blendType
0.0, -- float texAlpha
0, -- int sheetGridIndex
Citizen.ResultAsInteger()
)
print(result)// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const result = Citizen.invokeNative("0x86BB5FF45F193A02", // _ADD_TEXTURE_LAYER
0, // int textureId
GetHashKey("name"), // Hash albedoHash
GetHashKey("name"), // Hash normalHash
GetHashKey("name"), // Hash materialHash
0, // int blendType
0.0, // float texAlpha
0, // int sheetGridIndex
Citizen.resultAsInteger()
);
console.log(result)int result = Function.Call<int>((Hash)0x86BB5FF45F193A02, // _ADD_TEXTURE_LAYER
0, // int textureId
(uint)API.GetHashKey("name"), // Hash albedoHash
(uint)API.GetHashKey("name"), // Hash normalHash
(uint)API.GetHashKey("name"), // Hash materialHash
0, // int blendType
0.0f, // float texAlpha
0 // int sheetGridIndex
);Related PED natives
- _SET_TEXTURE_LAYER_TEXTURE_MAP
- _SET_TEXTURE_LAYER_ALPHA
- _SET_TEXTURE_LAYER_MOD
- _SET_TEXTURE_LAYER_PALLETE
- _SET_TEXTURE_LAYER_ROUGHNESS
- _SET_TEXTURE_LAYER_SHEET_GRID_INDEX
- _SET_TEXTURE_LAYER_TINT
- _ADD_PED_STAY_OUT_VOLUME
- _ADD_PED_SUBSCRIBE_TO_LEGENDARY_BLIPS
- _ADD_SCENARIO_BLOCKING_VOLUME
- _ADD_SCENARIO_TRANSITION
- _APPLY_TEXTURE_ON_PED
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.