EngineImageLinkTXD

From Multi Theft Auto: Wiki
Revision as of 20:09, 10 April 2023 by TheNormalnij (talk | contribs)
Jump to navigation Jump to search

ADDED/UPDATED IN VERSION 1.6.0 r21695:
This function links TXD file with an IMG container.

Syntax

boolean engineImageLinkTXD ( img img_file, string file_path, int modelID )


OOP Syntax Help! I don't understand this!

Method: img:linkTXD(...)


Required Arguments

  • img_file: The IMG file you want to link.
  • file_path: Path to the TXD file you want to link.
  • modelID: ID of the model you want to link to.

Returns

Returns true if IMG file was successfully linked, false otherwise.

Example

You could use the following code:

-- Load IMG
local img = engineLoadIMG( "file.img" )

-- Enable streaming from this IMG
engineAddImage( img )

-- Get model TXD id
local infernusModelID = 411
local infernusModelTxdID = engineGetModelTXDID( infernusModelID )

-- Link DFF and TXD to IMG files
engineImageLinkDFF( img, "infernus.dff", infernusModelID )
engineImageLinkTXD( img, "infernus.txd", infernusModelTxdID )

See Also