GetElementAngularVelocity: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
(Remove obsolete Requirements section)
 
Line 24: Line 24:
)
)
</syntaxhighlight>
</syntaxhighlight>
==Requirements==
{{Requirements|1.5.5-9.14060|1.5.5-9.14060|}}


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

Latest revision as of 17:14, 7 November 2024

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(sourcePlayer, commandName)
		local aX, aY, aZ = getElementAngularVelocity(sourcePlayer)

		outputChatBox("Your current angular velocity is: X: " .. aX .." Y: " .. aY .." Z: " .. aZz, sourcePlayer)
	end
)

See Also