GetElementRadius
From Multi Theft Auto: Wiki
| | This article needs checking. |
Reason: Is this function still incomplete? --Winky- 16:34, 23 December 2011 (CET) |
This function gets the radius from a element. Depending on the shape of the element this may be an accurate or very inaccurate way to detect if the player is near or within the element.
Syntax
float getElementRadius ( element theElement )
Required Arguments
- theElement: The element.
Returns
Returns float as radius, false otherwise.
Example
This example shows how to get the radius of a player
function myCommandHandler(command) local myradius = getElementRadius ( getLocalPlayer() ) if (myradius) then outputChatBox("Radius of my player is: " .. myradius) else outputChatBox("Error") end end addCommandHandler("getmyradius", myCommandHandler)
See Also
- createElement
- destroyElement
- getAttachedElements
- getElementAttachedOffsets
- getElementCollisionsEnabled
- getElementAttachedTo
- getElementBoundingBox
- getElementByID
- getElementChild
- getElementChildren
- getElementChildrenCount
- getElementData
- getElementDimension
- getElementDistanceFromCentreOfMassToBaseOfModel
- getElementHealth
- getElementID
- getElementInterior
- getElementParent
- getElementPosition
- getElementRadius
- getElementsByType
- getElementsWithinColShape
- getElementType
- getElementVelocity
- getRootElement
- isElement
- isElementAttached
- isElementLocal
- isElementOnScreen
- isElementStreamable
- isElementStreamedIn
- isElementWithinColShape
- setElementAlpha
- setElementCollisionsEnabled
- setElementData
- setElementDimension
- setElementDoubleSided
- setElementHealth
- setElementID
- setElementInterior
- setElementParent
- setElementPosition
- setElementStreamable
- setElementVelocity
- attachElements
- detachElements
- getElementColShape
- getElementMatrix
- getElementModel
- getElementRotation
- isElementInWater
- isElementSyncer
- setElementModel
- setElementRotation
- isElementCollidableWith
- setElementCollidableWith
- isElementDoubleSided
- setLowLODElement
- getLowLODElement
- isElementLowLOD
- attachElementToElement
- detachElementFromElement
- isElementFrozen
- setElementFrozen