Jump to content

Need basic help


laurens

Recommended Posts

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.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...