engineGetVisibleTextureNames | Multi Theft Auto: Wiki Skip to content

engineGetVisibleTextureNames

Client-side
Server-side
Shared

This function returns a list of the world textures which are being used to draw the current scene.

OOP Syntax Help! I don't understand this!

  • Method:Engine.getVisibleTextureNames(...)

Syntax

table|false engineGetVisibleTextureNames ( [ ​string nameFilter = "*", ​string modelIdOrName = "" ] )
Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.

  • nameFilter (default: "*"): Only include textures that match the wildcard string.
  • modelIdOrName (default: ""): Only include textures that are used by the model id (or model name).

Returns

  • table|false: visible textures

Returns a table of texture names if successful, false otherwise.

Code Examples

client

This example will output the names of all the visible textures that start with a.

for _, name in ipairs(engineGetVisibleTextureNames("a*")) do
outputConsole(name)
end

See Also

Engine Functions