dxGetMaterialSize | Multi Theft Auto: Wiki Skip to content

dxGetMaterialSize

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 gets the dimensions of the supplied material element.

Syntax

dxGetMaterialSize ( )

Code Examples

client
myTexture = dxCreateTexture( "man.png" )
local width, height = dxGetMaterialSize( myTexture )
outputChatBox( "man.png is " .. tostring(width) .. " pixels wide and " .. tostring(height) .. " pixels high" )