RemoveElementData
From Multi Theft Auto: Wiki
This function removes the element data with the given key for that element. The element data removal is synced with all the clients.
Syntax
bool removeElementData ( element theElement, string key )
OOP Syntax Help! I don't understand this!
- Method: element:removeData(...)
Required Arguments
- theElement: The element you wish to remove the data from.
- key: The key string you wish to remove.
Returns
Returns true if the data was removed succesfully, false if the given key does not exist in the element or the element is invalid.
Example
This will create an element data for know if a player has spawned.
function spawn() setElementData(source,"spawned",true) end addEventHandler ( "onPlayerSpawn", getRootElement(), spawn ) function wasted() removeElementData(source,"spawned") end addEventHandler ( "onPlayerWasted", getRootElement(), wasted )
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