EngineImageGetFile

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

ADDED/UPDATED IN VERSION 1.6.0 r21695:
This function gets a file from an IMG container.

Syntax

string engineImageGetFile ( img img_file, string/number file )


OOP Syntax Help! I don't understand this!

Method: img:getFile(...)


Required Arguments

  • img_file: The IMG file you want to get file from.
  • file: Name or position of the file you want to get.

Returns

Returns file's binary data if successful, false otherwise. Data size is bonded to 2 Kb block size.

Example

You could use the following code:

local img = engineLoadIMG( "file.img" )
local data = engineImageGetFile( img, 'test.dff' )
local dff = engineLoadDFF( data )
engineReplaceModel ( dff, 400 )


See Also