GetElementAngularVelocity

From Multi Theft Auto: Wiki
Revision as of 07:16, 3 April 2019 by NanoBob (talk | contribs) (Consistency with other wiki pages)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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

Syntax

float, float, float getElementAngularVelocity ( element theElement )           

OOP Syntax Help! I don't understand this!

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


Required Arguments

Returns

Returns three floats describing the x, y and z rotation

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)

Requirements

Minimum server version 1.5.5-9.14060
Minimum client version 1.5.5-9.14060

Note: Using this feature 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