RedM Natives

_GENERATE_SWATCH_TEXTURE

local hash = GetHashKey("CLOTHING_ITEM_M_EYES_001_TINT_001") _GENERATE_SWATCH_TEXTURE(0, hash, 0, true)

Hash0x160921255327C591
Runtime nameGenerateSwatchTexture
NamespaceGRAPHICS
SideClient
NameCommunity guess
Docs
Since build1207

Signature

void _GENERATE_SWATCH_TEXTURE(int slotId, Hash componentHash, int metapedType, BOOL p3);

Parameters

NameTypeDescription
slotIdint—
componentHashHash—
metapedTypeint—
p3BOOL—

Returns void

Description

Example:
local hash = GetHashKey("CLOTHING_ITEM_M_EYES_001_TINT_001")
_GENERATE_SWATCH_TEXTURE(0, hash, 0, true)
metapedType: see 0xEC9A1261BF0CE510

Usage

Lua
GenerateSwatchTexture(slotId, componentHash, metapedType, p3)

-- always works, by hash
Citizen.InvokeNative(0x160921255327C591, slotId, componentHash, metapedType, p3)
JavaScript and C#
JavaScript
GenerateSwatchTexture(slotId, componentHash, metapedType, p3);

// by hash
Citizen.invokeNative('0x160921255327C591', slotId, componentHash, metapedType, p3);
C#
Function.Call((Hash)0x160921255327C591, slotId, componentHash, metapedType, p3);
  • Hash parameters: the named function also accepts a string and hashes it for you; Citizen.InvokeNative needs the number — pass joaat("name") or a backtick literal like `name`.
  • The name is a community guess and may change. If the named call is missing in your client build, use InvokeNative with the hash — it always works.

Enums and flags

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.