GetAttachedElements: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(No difference)
|
Revision as of 20:12, 1 January 2007
This function returns a table of all the elements attached to the specified element
Syntax
table getAttachedElements ( element theElement )
Required Arguments
- theElement: The element which you require the information from.
Returns
Returns a table of all the elements attached to the specified element.
Example
-- Print a list of all the players attached to the specified element Inf = getElementByID ( "infernus1" ) attachedElements = getAttachedElements ( Inf ) if ( attachedElements ) then -- if we got the table attachedElementsList = "none" -- Loop through the table for ElementKey, ElementValue in attachedElements do -- add their name to the list if ( getElementType ( ElementValue ) == "player" ) then if ( attachedElementsList == "none" ) then attachedElementsList = getClientName ( ElementValue ) else attachedElementsList = attachedElementsList .. ", " .. getClientName ( ElementValue ) end end end outputConsole ( "Players attached: " .. attachedElementsList ) end
See Also
- attachElements
- createElement
- destroyElement
- detachElements
- getAttachedElements
- getElementAlpha
- getElementAttachedOffsets
- getElementAttachedTo
- getElementByIndex
- getElementByID
- getElementChild
- getElementChildren
- getElementChildrenCount
- getElementCollisionsEnabled
- getElementColShape
- getElementData
- getAllElementData
- hasElementData
- getElementDimension
- getElementHealth
- getElementID
- getElementInterior
- getElementMatrix
- getElementModel
- getElementParent
- getElementPosition
- getElementRotation
- getElementsByType
- getElementsWithinColShape
- getElementsWithinRange
- getElementType
- getElementVelocity
- getLowLODElement
- getRootElement
- isElement
- isElementAttached
- isElementCallPropagationEnabled
- isElementDoubleSided
- isElementFrozen
- isElementInWater
- isElementLowLOD
- isElementWithinColShape
- isElementWithinMarker
- setElementAlpha
- setElementAngularVelocity
- getElementAngularVelocity
- setElementAttachedOffsets
- setElementCallPropagationEnabled
- setElementCollisionsEnabled
- setElementData
- setElementDimension
- setElementDoubleSided
- setElementFrozen
- setElementHealth
- setElementID
- setElementInterior
- setElementModel
- setElementParent
- setElementPosition
- setElementRotation
- setElementVelocity
- setLowLODElement
- getPedContactElement
- getResourceDynamicElementRoot
- getResourceRootElement