Ok, it's been a year ago since I scripted for MTA I guess. I once did something to get the size of an element. I thought it was GetElementBoundingBox. Now I use this to get the size of the element 5422, but it just DOESN'T work. What do I miss so badly for this not to work?
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
minMaxOutput ( createObject ( 5422, 5540.6654, 1020.55122, 1240.545, 0, 0, 0 ))
I'm probably making a huge mistake here, but can anyone tell me to get me the data I want?
PS: The error message says i'm trying to take a global 'getElementBoundingBox' (nil value) or something like that I recall.