EngineGetModelTextureNames: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "{{Client function}} __NOTOC__ This function returns a table of the world textures which are applied to the specified model. ==Syntax== <syntaxhighlight lang="lua"> table engineGetModelTexture...")
 
(add oop syntax)
Line 7: Line 7:
table engineGetModelTextureNames( string modelId = "" )
table engineGetModelTextureNames( string modelId = "" )
</syntaxhighlight>  
</syntaxhighlight>  
 
{{OOP||Engine.getModelTextureNames}}
===Required Arguments===  
===Required Arguments===  
*'''modelId :''' You can either use the model id or the model name.
*'''modelId :''' You can either use the model id or the model name.

Revision as of 19:23, 2 January 2015

This function returns a table of the world textures which are applied to the specified model.

Syntax

table engineGetModelTextureNames( string modelId = "" )

OOP Syntax Help! I don't understand this!

Method: Engine.getModelTextureNames(...)


Required Arguments

  • modelId : You can either use the model id or the model name.

Returns

Returns a table if this function succeeds, false if it fails for some reason.

Example

This example will output the texture names applied to the Comet.

for _,name in ipairs( engineGetModelTextureNames( "480" ) ) do
    outputConsole( name )
end

The model name can also be used.

for _,name in ipairs( engineGetModelTextureNames( "Comet" ) ) do
    outputConsole( name )
end

See Also