M MY Multiplayer: Wiki
Side
Kind

getElementRadius

Client

Reads the radius of the collision sphere of an element's model.

float|false getElementRadius(element element)

Parameters

NameTypeDescription
elementelementThe element to read.

Returns

The radius in metres, or false if the element has no model or the model's collision is not loaded.

Example

local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle then
    outputDebugString(("radius: %.2f m"):format(getElementRadius(vehicle)))
end

See also