getElementBoundingBox | Multi Theft Auto: Wiki Skip to content

getElementBoundingBox

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 returns the minimum and maximum coordinates of an element's bounding box.

Note

The element must be streamed in for this function to work.

Syntax

getElementBoundingBox ( )

Code Examples

client

This example outputs to chatbox the minimum and the maximum coordinates of an element.

function minMaxOutput( theElement )
local x0, y0, z0, x1, y1, z1 = getElementBoundingBox( theElement )
if ( x0 ) then
outputChatBox( "The coords are: " .. x0 .. ", " .. y0 .. ", " .. z0 .. ", " .. x1 .. ", " .. y1 .. ", " .. z1 )
else
outputChatBox( "Failed to retrieve bounding box" )
end
end

See Also

Element Functions