engineImageGetFilesCount | Multi Theft Auto: Wiki Skip to content

engineImageGetFilesCount

Client-side
Server-side
Shared

Added in 1.6.0 r21695

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: files count

Returns an int with the number of files if successfull; otherwise, it throws an error.

Code Examples

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

See Also

Engine Functions