engineImportTXD | Multi Theft Auto: Wiki Skip to content

engineImportTXD

Client-side
Server-side
Shared

This function imports (adds) a loaded RenderWare Texture Dictionary into a specific model. This is necessary in order for the DFF loader to find any new textures. Please call this function before loading the DFF model file, in order to allow the DFF loading process to find the new textures. This function can also replace default GTA textures, so that it becomes possible to e.g. put custom images on existing billboards - ped and weapon textures are also supported.

Note
  • CJ clothing component textures can be replaced by using the IDs listed in the clothes replacement article.
  • Follow loading order ( COL -> TXD -> DFF ) which is used in the example - as other orders can cause collisions, textures or the DFF not to load.
Tip

Do your TXD files take megabytes of disk space? You can read some tips on reducing the size of TXD files to compress them without ruining texture quality.

OOP Syntax Help! I don't understand this!

  • Method:txd:import(...)

Syntax

bool engineImportTXD ( ​txd texture, ​string/int model )
Required Arguments
  • texture: The TXD element that was loaded with engineLoadTXD.
  • model: The model id or model name to import the TXD into.

Returns

  • bool: result

Returns true if the function executed succesfully, false otherwise.

Code Examples

client
local txd = engineLoadTXD("infernus.txd")
local dff = engineLoadDFF("infernus.dff")
engineImportTXD(txd, 411)
engineReplaceModel(dff, 411)

See Also

Engine Functions