EngineGetVisibleTextureNames: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
(add oop syntax)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Client function}}
{{Client function}}
__NOTOC__
__NOTOC__
{{New feature|3.0110|1.1|
Only available in 1.1
}}
This function returns a list of the world textures which are being used to draw the current scene.
This function returns a list of the world textures which are being used to draw the current scene.


==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool engineGetVisibleTextureNames ( [ string nameFilter = "*", string modelFilter = "" ] )
table engineGetVisibleTextureNames ( [ string nameFilter = "*", string modelId = "" ] )
</syntaxhighlight>  
</syntaxhighlight>  
 
{{OOP||Engine.getVisibleTextureNames}}
===Optional Arguments===  
===Optional Arguments===  
*'''nameFilter:''' Excludes textures from the list that do not match the wildcard string.
*'''nameFilter:''' Only include textures that match the wildcard string.
*'''modelFilter:''' Excludes textures from the list that do not appear in the named model. This can be a model name such as "des_ranch" or a model id number. If not set, all textures are included.
*'''modelId :''' Only include textures that are used by the model id (or model name)


===Returns===
===Returns===

Latest revision as of 19:13, 2 January 2015

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 = "" ] )

OOP Syntax Help! I don't understand this!

Method: Engine.getVisibleTextureNames(...)


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