GetElementAttachedTo
From Multi Theft Auto: Wiki
This function determines the element that the specified element is attached to.
Syntax
element getElementAttachedTo ( element theElement )
OOP Syntax Help! I don't understand this!
- Method: element:getAttachedTo(...)
Required Arguments
- theElement: The element you require the information for.
Returns
Returns the element that the chosen element is attached to, or false if the element isn't attached to another element.
Example
Click to collapse [-]
ServerThis example defines a console command that outputs the type of the element that the player is attached to.
function getAttached ( thePlayer ) local attached = getElementAttachedTo ( thePlayer ) if ( attached ) then outputConsole ( getPlayerName(thePlayer) .. " is attached to a " .. getElementType(attached) ) else outputConsole ( getPlayerName(thePlayer) .. " is not attached to an element" ) end end addCommandHandler ( "getattached", getAttached )
See Also
- attachElements
- clearElementVisibleTo
- cloneElement
- createElement
- destroyElement
- detachElements
- getAllElementData
- getAttachedElements
- getElementAlpha
- getElementAttachedOffsets
- getElementAttachedTo
- getElementCollisionsEnabled
- getElementByID
- getElementByIndex
- getElementChild
- getElementChildren
- getElementChildrenCount
- getElementColShape
- getElementData
- getElementDimension
- getElementHealth
- getElementID
- getElementInterior
- getElementMatrix
- getElementModel
- getElementParent
- getElementPosition
- getElementRotation
- getElementSyncer
- getElementType
- getElementVelocity
- getElementZoneName
- getElementsByType
- getElementsWithinColShape
- getLowLODElement
- getRootElement
- isElement
- isElementAttached
- isElementCallPropagationEnabled
- isElementDoubleSided
- isElementFrozen
- isElementInWater
- isElementLowLOD
- isElementVisibleTo
- isElementWithinColShape
- isElementWithinMarker
- removeElementData
- setElementAlpha
- setElementAngularVelocity
- getElementAngularVelocity
- setElementAttachedOffsets
- setElementCallPropagationEnabled
- setElementCollisionsEnabled
- setElementData
- setElementDimension
- setElementDoubleSided
- setElementFrozen
- setElementHealth
- setElementID
- setElementInterior
- setElementModel
- setElementParent
- setElementPosition
- setElementRotation
- setElementSyncer
- setElementVelocity
- setElementVisibleTo
- setLowLODElement