GetElementAngularVelocity

From Multi Theft Auto: Wiki
Revision as of 14:15, 28 August 2018 by Lexr128 (talk | contribs) (fix revision 14165)
Jump to navigation Jump to search

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

Syntax

bool getElementAngularVelocity ( element theElement )           

OOP Syntax Help! I don't understand this!

Method: element:getAngularVelocity(...)
Variable: .angularVelocity
Counterpart: setElementAngularVelocity


Required Arguments

Returns

Returns true if it was succesful, false otherwise.

Example

addCommandHandler("getangularvelocity", function(player)
    --retrieve angular velocity of the player
    local avx, avy, avz = getElementAngularVelocity(player)
    outputChatBox("Your current angular velocity is: X: "..avx.." Y: "..avy.." Z: "..avz, player, 0, 255, 0, false)
end)

See Also