laurens Posted September 1, 2009 Share Posted September 1, 2009 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
50p Posted September 1, 2009 Share Posted September 1, 2009 getElementBoundingBox is only client-side. Maybe you try to call if from server-side script. Link to comment
laurens Posted September 2, 2009 Author Share Posted September 2, 2009 Now I remember again, I totally forgot about the client and serverside stuff Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now