SET_ENTITY_DISTANCE_CULLING_RADIUS
It overrides the default distance culling radius of an entity.
Signature
void SET_ENTITY_DISTANCE_CULLING_RADIUS(Entity entity, float radius);Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | The entity handle to override the distance culling radius. |
radius | float | The new distance culling radius. |
Returns void
Description
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
SetEntityDistanceCullingRadius(entity, radius)
-- always works, by hash
Citizen.InvokeNative(0xd3a183a3, entity, radius)JavaScript and C#
SetEntityDistanceCullingRadius(entity, radius);
// by hash
Citizen.invokeNative('0xd3a183a3', entity, radius + 0.0000001);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. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.