engineLoadIMG | Multi Theft Auto: Wiki Skip to content

engineLoadIMG

Client-side
Server-side
Shared

Added in 1.6.0 r21695

This function loads an IMG container.

Tip

If you're experiencing crashes/game hangs with default values, try to adjust memory/buffer/cache sizes with engineStreamingSetMemorySize, engineStreamingSetBufferSize and/or engineStreamingSetModelCacheLimits.

OOP Syntax Help! I don't understand this!

Syntax

img engineLoadIMG ( ​string img_file )
Required Arguments
  • img_file: The filepath to the IMG file you want to load.

Returns

  • img: img element

Returns an IMG element if the IMG file loaded; otherwise, it throws an error.

Code Examples

client

This example loads IMG file from directory and then prints number of files in it.

local img = engineLoadIMG('file.img')
iprint('Number of files: ',#engineImageGetFiles(img))

See Also

Engine Functions