getElementDimension | Multi Theft Auto: Wiki Skip to content

getElementDimension

Client-side
Server-side
Shared

Pair: setElementDimension

This function allows you to retrieve the dimension of an element. See Dimension for the list of valid element types. The dimension determines what/who the element is visible to.

OOP Syntax Help! I don't understand this!

  • Method:element:getDimension(...)
  • Variable: .dimension

Syntax

int|false getElementDimension ( ​element theElement )
Required Arguments
  • theElement: The element in which you'd like to retrieve the dimension of.

Returns

  • int|false: dimension

Returns an integer for the dimension if theElement is valid, false otherwise.

Code Examples

client
OOP Required
addCommandHandler('dim', function(cmd)
outputChatBox('Your current dimension: '..localPlayer.dimension)
end)

See Also

Element Functions