RedM Natives

SET_ENTITY_DISTANCE_CULLING_RADIUS

It overrides the default distance culling radius of an entity.

Hash0xD3A183A3
Runtime nameSetEntityDistanceCullingRadius
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

void SET_ENTITY_DISTANCE_CULLING_RADIUS(Entity entity, float radius);

Parameters

NameTypeDescription
entityEntity

The entity handle to override the distance culling radius.

radiusfloat

The new distance culling radius.

Returns void

Description

Cfx.re native reference

It overrides the default distance culling radius of an entity. Set to 0.0 to reset. If you want to interact with an entity outside of your players' scopes set the radius to a huge number.

WARNING: Culling natives are deprecated and have known, unfixable issues

Usage

Lua
SetEntityDistanceCullingRadius(entity, radius)

-- always works, by hash
Citizen.InvokeNative(0xd3a183a3, entity, radius)
JavaScript and C#
JavaScript
SetEntityDistanceCullingRadius(entity, radius);

// by hash
Citizen.invokeNative('0xd3a183a3', entity, radius + 0.0000001);
C#
Function.Call((Hash)0xd3a183a3, entity, radius);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.