_GENERATE_SWATCH_TEXTURE
local hash = GetHashKey("CLOTHING_ITEM_M_EYES_001_TINT_001") _GENERATE_SWATCH_TEXTURE(0, hash, 0, true)
Hash
0x160921255327C591Runtime name
GenerateSwatchTextureNamespaceGRAPHICS
SideClient
NameCommunity guess
Docs
Since build1207
Signature
void _GENERATE_SWATCH_TEXTURE(int slotId, Hash componentHash, int metapedType, BOOL p3);Parameters
| Name | Type | Description |
|---|---|---|
slotId | int | — |
componentHash | Hash | — |
metapedType | int | — |
p3 | BOOL | — |
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
GenerateSwatchTexture(slotId, componentHash, metapedType, p3)
-- always works, by hash
Citizen.InvokeNative(0x160921255327C591, slotId, componentHash, metapedType, p3)JavaScript and C#
GenerateSwatchTexture(slotId, componentHash, metapedType, p3);
// by hash
Citizen.invokeNative('0x160921255327C591', slotId, componentHash, metapedType, p3);Function.Call((Hash)0x160921255327C591, slotId, componentHash, metapedType, p3);- Hash parameters: the named function also accepts a string and hashes it for you;
Citizen.InvokeNativeneeds the number — passjoaat("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
InvokeNativewith the hash — it always works.
Enums and flags
- eMetaPedType 4 values
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.