engineImageLinkDFF | Multi Theft Auto: Wiki Skip to content

engineImageLinkDFF

Client-side
Server-side
Shared

Pair: engineRestoreDFFImage

Added in 1.6.0 r21695

This function links DFF file with an IMG container. This function does not change a model immediately. You should use engineRestreamWorld to reload models.

OOP Syntax Help! I don't understand this!

  • Method:img:linkDFF(...)

Syntax

bool engineImageLinkDFF ( ​img img_file, ​string/int file, ​int modelID )
Required Arguments
  • img_file: The IMG file you want to link.
  • file: Name or position of the DFF file you want to link.
  • modelID: ID of the model you want to link to.

Returns

  • bool: result

Returns true if the IMG file was successfully linked, false otherwise, or throws an error if invalid arguments were provided.

Code Examples

client
-- 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)
-- Reload game models
engineRestreamWorld()

See Also

Engine Functions