SetElementDimension: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 16: | Line 16: | ||
==Example== | ==Example== | ||
<section name="Server" class="server" show="false"> | <section name="Server" class="server" show="false"> | ||
In this example the players dimension is set to ID 1 when they enter a vehicle, and set back to dimension 0 when they exit the vehicle. | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function onPlayerEnterVehicle ( theVehicle, seat, jacked ) | function onPlayerEnterVehicle ( theVehicle, seat, jacked ) |
Revision as of 12:02, 12 August 2007
This function allows you to set the dimension of any element. The dimension determines what/who the element is visible to.
Syntax
bool setElementDimension ( element theElement, int dimension )
Required Arguments
- theElement: The element in which you'd like to set the dimension of.
- dimension: An integer representing the dimension ID
Returns
Returns 'true' if 'theElement' and 'dimension' is valid, 'false' otherwise.
Example
Click to expand [+]
ServerSee 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