RedM Natives

_IS_BATCH_MODEL

Returns whether the model's map entity type is MAP_ENTITY_TYPE_GRASS_BATCH or MAP_ENTITY_TYPE_PROP_BATCH.

Hash0xD4636C2EDB0DEA8A
Runtime nameIsBatchModel
NamespaceENTITY
SideClient
NameCommunity guess
Docs
Since build1207
Also known as_IS_MODEL_IN_NEED_OF_VEG_MODIFIER

Signature

BOOL _IS_BATCH_MODEL(Hash model);

Parameters

NameTypeDescription
modelHash—

Returns BOOL

Description

alloc8or RDR3 NativeDB

Returns whether the model's map entity type is MAP_ENTITY_TYPE_GRASS_BATCH or MAP_ENTITY_TYPE_PROP_BATCH.

Scripts use the result to choose how to hide a single model, since batched geometry is not removed through the normal model-hide path:
- TRUE: GRAPHICS::ADD_VEG_MODIFIER_SPHERE / REMOVE_VEG_MODIFIER_SPHERE
- FALSE: ENTITY::CREATE_MODEL_HIDE / CREATE_MODEL_HIDE_EXCLUDING_SCRIPT_OBJECTS / REMOVE_MODEL_HIDE

Not limited to foliage: many natural world models return TRUE (rocks, trees, bushes, grass, crops, branches, roots, logs, debris), as well as ambient vfx batches such as butterflies, dragonflies, and fireflies.

Model list: https://pastebin.com/fi4ynTnk

VORPCORE RDR3natives

Checks whether the specified model can be handled through the vegetation modifier path.
This is not limited strictly to foliage. Testing shows many natural world
models can return TRUE, including rocks, trees, bushes, grass, crops, branches, roots, logs, debris, and similar environment assets.

Usage

Lua
local retval = IsBatchModel(model)

-- always works, by hash
local retval = Citizen.InvokeNative(0xD4636C2EDB0DEA8A, model, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = IsBatchModel(model);

// by hash
const retval = Citizen.invokeNative('0xD4636C2EDB0DEA8A', model, Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0xD4636C2EDB0DEA8A, model);
  • Hash parameters: the named function also accepts a string and hashes it for you; Citizen.InvokeNative needs the number — pass joaat("name") or a backtick literal like `name`.
  • The name is a community guess and may change. If the named call is missing in your client build, use InvokeNative with the hash — it always works.

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives

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