GetElementAngularVelocity

From Multi Theft Auto: Wiki
Revision as of 22:58, 27 August 2018 by Einheit-101 (talk | contribs) (First creation (please check if that info is correct, i am no c++ expert))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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