engineGetModelTextures | Multi Theft Auto: Wiki Skip to content

engineGetModelTextures

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function allows you to get the textures of any model.

Syntax

engineGetModelTextures ( )

Code Examples

client

Get the textures for model ID 3722 and draw them with dxDrawImage.

function init()
textures = engineGetModelTextures(3722)
addEventHandler("onClientRender", root, render)
end
addEventHandler("onClientResourceStart", resourceRoot, init)
function render()
local offset = 0
for name,texture in pairs(textures) do
local size = dxGetPixelsSize(dxGetTexturePixels(texture))
dxDrawImage(0+offset, 0, size, size, texture)
offset = offset + size
end
end

See Also

Engine Functions
Engine Elements