GetElementRadius: Difference between revisions
Jump to navigation
Jump to search
Line 18: | Line 18: | ||
==Example== | ==Example== | ||
<section name="Client" class="client" show="true"> | |||
Example of how to derive the radius of a player: | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function myCommandHandler(source, command) | |||
local myradius = getElementRadius ( source ) | |||
if (myradius) then | |||
outputChatBox("Radius of my player is: " .. myradius) | |||
else | |||
outputChatBox("Error") | |||
end | |||
end | |||
addCommandHandler("getmyradius", myCommandHandler) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | |||
==See Also== | ==See Also== | ||
{{Client element functions}} | {{Client element functions}} | ||
[[Category:Needs Example]] | [[Category:Needs Example]] |
Revision as of 10:22, 24 May 2010
This function gets the radius from a element.
Syntax
float getElementRadius ( element theElement )
Required Arguments
- theElement: The element.
Returns
Returns float as radius, false otherwise.
Example
Click to collapse [-]
ClientExample of how to derive the radius of a player:
function myCommandHandler(source, command) local myradius = getElementRadius ( source ) if (myradius) then outputChatBox("Radius of my player is: " .. myradius) else outputChatBox("Error") end end addCommandHandler("getmyradius", myCommandHandler)
See Also
- getElementBoneMatrix
- getElementBonePosition
- getElementBoneRotation
- getElementBoundingBox
- getElementDistanceFromCentreOfMassToBaseOfModel
- getElementLighting
- getElementRadius
- isElementCollidableWith
- isElementLocal
- isElementOnScreen
- isElementStreamable
- isElementStreamedIn
- isElementSyncer
- isElementWaitingForGroundToLoad
- setElementBoneMatrix
- setElementBonePosition
- setElementBoneRotation
- setElementCollidableWith
- setElementStreamable
- updateElementRpHAnim
- Shared
- 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