natives.requestStreamedTxd

From GTA Connected
Revision as of 00:45, 28 November 2025 by ChrisGame20 (talk | contribs) (Created page with "{{ScriptItem |endpoint = client |games = iv |type = function |name = natives.requestStreamedTxd |parameters = string txdName, bool persistent |parameter1 = string txdName Name of the streamed TXD (texture dictionary) to request |parameter2 = bool persistent If true, keeps the TXD loaded persistently; if false, it may be unloaded when not needed |usage = Requests a streamed TXD to be loaded into memory so its textures can be accessed |notes = - Unlike natives.loadTxd...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function Client Only icon-iv.png Online and Offline

Available since Client 1.0.0

void natives.requestStreamedTxd(string txdName, bool persistent)

The natives.requestStreamedTxd function is used to Requests a streamed TXD to be loaded into memory so its textures can be accessed.

Parameters

1) string txdName Name of the streamed TXD (texture dictionary) to request.
2) bool persistent If true, keeps the TXD loaded persistently; if false, it may be unloaded when not needed.

Return

void This function doesn't return a value.

Notes

  • - Unlike natives.loadTxd, this function can request TXDs that are **outside the default texture folder**, since it uses the streaming system of the game- Must be called before using natives.getTextureFromStreamedTxd to retrieve textures from that TXD.

Examples

Example 1 - JavaScript:

bindEventHandler("OnResourceReady", thisResource, function() {

   // Request a streamed TXD for a weapon icon
   natives.requestStreamedTxd("w_glock", true);

});

Compatibility

There isn't any compatibility information for this function.