engineImageGetFile | Multi Theft Auto: Wiki Skip to content

engineImageGetFile

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.


This function gets a file from an IMG container.

OOP Syntax Help! I don't understand this!

  • Method: img:getFile(...)

Syntax

string engineImageGetFile ( img img_file, string/number file )
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

  • string: value

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

Code Examples

shared

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

Engine Functions
Engine Elements