getElementRotation | Multi Theft Auto: Wiki Skip to content

getElementRotation

Client-side
Server-side
Shared

Pair: setElementRotation

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


Retrieve the rotation of elements.

Syntax

getElementRotation ( )

Code Examples

server
function onPlayerTargeted ( targetElem )
if ( isElement(targetElem) and getElementType (targetElem) == "player" ) then
local x,y,z = getElementRotation ( targetElem )
outputChatBox ( "Target player rotation: " .. x .. " " .. y .. " " .. z )
end
end
addEventHandler ( "onClientPlayerTarget", root, onPlayerTargeted )

See Also

Element Functions