IsElementLocal
From Multi Theft Auto: Wiki
This function checks whether a clientside element is local to the client (doesn't exist in the server) or not.
Syntax
bool isElementLocal ( element theElement )
OOP Syntax Help! I don't understand this!
- Method: element:isLocal(...)
- Variable: .localElement
Required Arguments
- theElement: The element that we want to check.
Returns
Returns true if the passed element is local, false if not or if invalid parameters are passed.
Example
This clientside function destroys all local radar blips.
function destroyAllLocalBlips ( ) -- get a table containing all blips local allBlips = getElementsByType( "blip" ) -- for each blip in this table, for index, theBlip in ipairs ( allBlips ) do -- check if it's a blip that only exists locally, if isElementLocal ( theBlip ) then -- and destroy it in that case destroyElement ( theBlip ) end end end
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