RedM Natives

TEXTURE_DOWNLOAD_REQUEST

Returns textureDownloadId

Hash0x16160DA74A8E74A2
Runtime nameTextureDownloadRequest
NamespaceNETWORK
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x16160DA74A8E74A2

Signature

int TEXTURE_DOWNLOAD_REQUEST(Any* gamerHandle, const char* filePath, const char* name, BOOL p3);

Parameters

NameTypeDescription
gamerHandleAny*—
filePathconst char*—
nameconst char*—
p3BOOL—

Returns int

Description

Returns textureDownloadId

Usage

Lua
local retval, gamerHandle = TextureDownloadRequest(filePath, name, p3)

-- always works, by hash
local retval, gamerHandle = Citizen.InvokeNative(0x16160DA74A8E74A2, Citizen.PointerValueInt(), filePath, name, p3, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const [retval, gamerHandle] = TextureDownloadRequest(filePath, name, p3);

// by hash
const [retval, gamerHandle] = Citizen.invokeNative('0x16160DA74A8E74A2', Citizen.pointerValueInt(), filePath, name, p3, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
var gamerHandle = new OutputArgument();
int retval = Function.Call<int>((Hash)0x16160DA74A8E74A2, gamerHandle, filePath, name, p3);
// gamerHandle.GetResult<int>()
  • Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
  • Any* arguments are often structs. Build them with a DataView buffer and pass it with :Buffer() — see the examples and notes below.

Sources

alloc8or RDR3 NativeDB

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