getElementRadius | Multi Theft Auto: Wiki Skip to content

getElementRadius

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

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


This function gets the radius of an element. Normally, sphere or circle-shaped elements tend to return a more accurate and expected radius than others with another shapes.

Syntax

getElementRadius ( )

Code Examples

client

This example shows how to get and output the radius of every player who types the/getmyradiuscommand (which will always be1).

local function outputLocalPlayerRadius()
outputChatBox("Your radius is " .. getElementRadius(localPlayer))
end
addCommandHandler("getmyradius", outputLocalPlayerRadius)

See Also

Element Functions