getElementAngularVelocity | Multi Theft Auto: Wiki Skip to content

getElementAngularVelocity

Client-side
Server-side
Shared

Pair: setElementAngularVelocity

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


Gets the current angular velocity of a specified, supported element.

OOP Syntax Help! I don't understand this!

  • Method:element:getAngularVelocity(...)
  • Variable: .angularVelocity

Syntax

float,​ float,​ float getElementAngularVelocity ( element theElement )
Required Arguments
  • theElement: The element to retrieve the angular velocity from. Can be either a player , ped , object , vehicle or a custom weapon . Server side supports only vehicles currently.

Returns

  • float: x
  • float: y
  • float: z

Returns three floats describing the x, y and z rotation

Code Examples

shared
addCommandHandler("getangularvelocity",
function(sourcePlayer, commandName)
local aX, aY, aZ = getElementAngularVelocity(sourcePlayer)
outputChatBox("Your current angular velocity is: X: " .. aX .." Y: " .. aY .." Z: " .. aZz, sourcePlayer)
end
)

See Also

Element Functions