GetElementZoneName
Jump to navigation
Jump to search
This function allows you to retrieve the zone name of an element (eg. Verdant Bluffs or Ocean Docks)
Syntax
string getElementZoneName ( element theElement )
Required Arguments
- theElement: The element in which you'd like to retrieve the zone name from
Returns
Returns the string of the elements zone name
Example
This example shows you how to return your own location by doing /loc in the chatbox or just loc in console
addCommandHandler("loc", "playerloc") function playerloc ( source ) local playername = getClientName ( source ) local location = getElementZoneName ( source ) if ( source ) then -- if the player is found outputChatBox ( "* " ..playername.. "'s Location: " ..location, root, 0, 255, 255 ) -- Output the player's name and zone name else outputChatBox ( "* " ..playername.. "'s Location not found.", root, 0, 255, 255 ) -- Output error message if not found 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