EngineLoadIMG

From Multi Theft Auto: Wiki
Revision as of 18:32, 5 January 2024 by Hashmap (talk | contribs) (Add note for possible fixes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

ADDED/UPDATED IN VERSION 1.6.0 r21708:
This function loads an IMG container into GTA. Only 2 IMG archives can be loaded into GTA
[[{{{image}}}|link=|]] Note:

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

Syntax

img engineLoadIMG ( string img_file )

OOP Syntax Help! I don't understand this!

Method: EngineIMG(...)


Required Arguments

  • img_file: The filepath to the IMG file you want to load.

Returns

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

Examples

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