getElementRadius
Client
Reads the radius of the collision sphere of an element's model.
float|false getElementRadius(element element)
Parameters
| Name | Type | Description |
|---|---|---|
| element | element | The 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