_ADD_TEXTURE_LAYER
Creates ped overlay in texture override data and returns it's index.
Hash
0x86BB5FF45F193A02Runtime name
AddTextureLayerNamespacePED
SideClient
NameCommunity guess
Docs
Since build1207
Signature
int _ADD_TEXTURE_LAYER(int textureId, Hash albedoHash, Hash normalHash, Hash materialHash, int blendType, float texAlpha, int sheetGridIndex);Parameters
| Name | Type | Description |
|---|---|---|
textureId | int | — |
albedoHash | Hash | — |
normalHash | Hash | — |
materialHash | Hash | — |
blendType | int | — |
texAlpha | float | — |
sheetGridIndex | int | — |
Returns int
Description
Creates ped overlay in texture override data and returns it's index.
This index are used for further overlay editing.
albedoHash: a hash of overlay's albedo texture
colorType: a color type(from 0 to 2). 0 is used for overlays with RGB colors usually.
Usage
local retval = AddTextureLayer(textureId, albedoHash, normalHash, materialHash, blendType, texAlpha, sheetGridIndex)
-- always works, by hash
local retval = Citizen.InvokeNative(0x86BB5FF45F193A02, textureId, albedoHash, normalHash, materialHash, blendType, texAlpha, sheetGridIndex, Citizen.ResultAsInteger())JavaScript and C#
const retval = AddTextureLayer(textureId, albedoHash, normalHash, materialHash, blendType, texAlpha, sheetGridIndex);
// by hash
const retval = Citizen.invokeNative('0x86BB5FF45F193A02', textureId, albedoHash, normalHash, materialHash, blendType, texAlpha + 0.0000001, sheetGridIndex, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0x86BB5FF45F193A02, textureId, albedoHash, normalHash, materialHash, blendType, texAlpha, sheetGridIndex);- 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`. - Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason. - 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.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.