engineImageGetFilesCount | Multi Theft Auto: Wiki Skip to content

engineImageGetFilesCount

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 returns the number of files an IMG file has.

OOP Syntax Help! I don't understand this!

  • Method: img:getFilesCount(...)
  • Variable: .filesCount

Syntax

int engineImageGetFilesCount ( img imgArchive )
Required Arguments
  • imgArchive: the IMG archive handler

Returns

  • int: value

Returns an int with the number of files.

Code Examples

shared

You could use the following code:

local img = engineLoadIMG( "file.img" )
local count = engineImageGetFilesCount( img )
outputChatBox("'file.img' has " .. count .. " files")

See Also

Engine Functions
Engine Elements