GetElementAngularVelocity: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (fix revision 14165)
(Requirements)
Line 22: Line 22:
end)
end)
</syntaxhighlight>
</syntaxhighlight>
==Requirements==
{{Requirements|1.5.5-9.14060|1.5.5-9.14060|}}


==See Also==
==See Also==
{{Element functions}}
{{Element functions}}

Revision as of 20:11, 12 September 2018

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)

Requirements

This template will be deleted.

See Also