GetElementType: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
===Required Arguments=== | ===Required Arguments=== | ||
*''' | *'''element:''' The element you wish to get the type of. | ||
===Returns=== | ===Returns=== | ||
Line 21: | Line 16: | ||
==Example== | ==Example== | ||
This example | This example destroys a haystack when a player targets it | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
addEventHandler ( "onPlayerTargeted", root, "onPlayerTargeted" ) | |||
function onPlayerTargeted ( element ) | |||
if ( getElementType ( element ) == "object" ) and ( getObjectModel ( element ) == 3374 ) then | |||
destroyElement ( element ) | |||
end | |||
end | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{ | [[Element]] | ||
{{Element functions}} |
Revision as of 15:59, 13 August 2006
This fake function is for use with blah & blah and does blahblahblabhalbhl
Syntax
string getElementType ( element element )
Required Arguments
- element: The element you wish to get the type of.
Returns
Returns true if blah, false otherwise.
Example
This example destroys a haystack when a player targets it
addEventHandler ( "onPlayerTargeted", root, "onPlayerTargeted" ) function onPlayerTargeted ( element ) if ( getElementType ( element ) == "object" ) and ( getObjectModel ( element ) == 3374 ) then destroyElement ( element ) end 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