engineImageGetFiles | Multi Theft Auto: Wiki Skip to content

engineImageGetFiles

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 the list of files from an IMG container.

OOP Syntax Help! I don't understand this!

  • Method: img:getFiles(...)
  • Variable: .files

Syntax

table engineImageGetFiles ( img imgArchive )
Required Arguments
  • imgArchive: The IMG file handler you want to get files from.

Returns

  • table: value

Returns array table with files in the IMG element if successfull, false otherwise.

Code Examples

shared

You could use the following code:

local img = engineLoadIMG( "file.img" )
local filesInArchive = engineImageGetFiles( img )
outputChatBox("'file.img' contains files:")
for fileId = 1, #filesInArchive do
outputChatBox(fileId .. ": " .. filesInArchive[fileId])
end

See Also

Engine Functions
Engine Elements