engineLoadIMG | Multi Theft Auto: Wiki Skip to content

engineLoadIMG

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


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

Note

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: value

Returns an IMG element if the IMG file loaded, false otherwise.

Code Examples

shared

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
Engine Elements