IsElementWaitingForGroundToLoad
From Multi Theft Auto: Wiki
This function checks whether MTA has frozen an element because it is above map objects which are still loading or not.
Note: When vehicles are frozen waiting for collisions to load they do not overwrite the frozen status set by setElementFrozen. |
Syntax
bool isElementWaitingForGroundToLoad ( element theElement )
OOP Syntax Help! I don't understand this!
- Method: element:isWaitingForGroundToLoad(...)
- Variable: .waitingForGroundToLoad
Required arguments
- theElement: the element to check its frozen waiting for custom map objects to load status. It can be a vehicle, ped or player.
Returns
Returns true if the specified element is frozen waiting for collisions of custom map objects to load. Returns false if it's not or if the specified element is invalid.
Example
Click to collapse [-]
Clientside exampleThe next code snippet outputs a message when a vehicle respawns far away from players, above an object.
local function notifyFarRespawnOnMap() if isElementWaitingForGroundToLoad(source) then outputChatBox("* A " .. getVehicleName(source) .. " respawned above an object which is far away! Find it quick!", 128, 255, 0) end end addEventHandler("onClientVehicleRespawn", root, notifyFarRespawnOnMap)
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