EngineGetVisibleTextureNames: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 5: Line 5:
==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
table engineGetVisibleTextureNames ( [ string nameFilter = "*", string modelId ] )
table engineGetVisibleTextureNames ( [ string nameFilter = "*", string modelId = "" ] )
</syntaxhighlight>  
</syntaxhighlight>  



Revision as of 17:07, 22 May 2012

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

Syntax

table engineGetVisibleTextureNames ( [ string nameFilter = "*", string modelId = "" ] )

Optional Arguments

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

Returns

Returns a table of texture names.

Example

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