SetElementAngularVelocity
From Multi Theft Auto: Wiki
Sets the angular velocity of a specified, supported element (Applies a spin to it).
Syntax
bool setElementAngularVelocity ( element theElement, float rx, float ry, float rz )
OOP Syntax Help! I don't understand this!
- Method: element:setAngularVelocity(...)
- Variable: .angularVelocity
- Counterpart: getElementAngularVelocity
Required Arguments
- theElement: The element to apply the spin to. Can be either a player, ped, object, vehicle or a custom weapon.
- rx: velocity around the X axis
- ry: velocity around the Y axis
- rz: velocity around the Z axis
Returns
Returns true if it was succesful, false otherwise.
Example
function onColShapeHit ( thePlayer, matchingDimension ) -- When a player hits the collision shape, give him a spin setElementAngularVelocity ( thePlayer, 0, 0, 20 ) end addEventHandler ( "onColShapeHit", root, onColShapeHit )
Requirements
Minimum supported server | 1.5.5-9.14060 |
---|---|
Minimum supported client | 1.5.5-9.14060 |
Note: Using this function requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="1.5.5-9.14060" client="1.5.5-9.14060" />
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