RedM Natives

_REQUEST_TEXTURE

Creates a texture override data for ped and returns it's index.

Hash0xC5E7204F322E49EB
Runtime nameRequestTexture
NamespacePED
SideClient
NameCommunity guess
Docs
Since build1207

Signature

int _REQUEST_TEXTURE(Hash albedoHash, Hash normalHash, Hash materialHash);

Parameters

NameTypeDescription
albedoHashHash—
normalHashHash—
materialHashHash—

Returns int

Description

Creates a texture override data for ped and returns it's index.
So you can replace any texture of any ped's component.
Also, you can add overlays on it, such as aging, lipstick and more.
Textures can be reused by multiple peds at once.
You can keep only 32 textures at once(including other peds).

https://github.com/femga/rdr3_discoveries/blob/master/clothes/change_overlays_script.lua
materialHash: https://github.com/femga/rdr3_discoveries/blob/master/clothes/cloth_drawable_albedo_normal_material_TEMPORARY.lua

Usage

Lua
local retval = RequestTexture(albedoHash, normalHash, materialHash)

-- always works, by hash
local retval = Citizen.InvokeNative(0xC5E7204F322E49EB, albedoHash, normalHash, materialHash, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = RequestTexture(albedoHash, normalHash, materialHash);

// by hash
const retval = Citizen.invokeNative('0xC5E7204F322E49EB', albedoHash, normalHash, materialHash, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0xC5E7204F322E49EB, albedoHash, normalHash, materialHash);
  • 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.

Sources

alloc8or RDR3 NativeDB

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