_IS_BATCH_MODEL
Returns whether the model's map entity type is MAP_ENTITY_TYPE_GRASS_BATCH or MAP_ENTITY_TYPE_PROP_BATCH.
0xD4636C2EDB0DEA8AIsBatchModel_IS_MODEL_IN_NEED_OF_VEG_MODIFIERSignature
BOOL _IS_BATCH_MODEL(Hash model);Parameters
| Name | Type | Description |
|---|---|---|
model | Hash | — |
Returns BOOL
Description
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
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
local retval = IsBatchModel(model)
-- always works, by hash
local retval = Citizen.InvokeNative(0xD4636C2EDB0DEA8A, model, Citizen.ReturnResultAnyway())JavaScript and C#
const retval = IsBatchModel(model);
// by hash
const retval = Citizen.invokeNative('0xD4636C2EDB0DEA8A', model, Citizen.returnResultAnyway());bool retval = Function.Call<bool>((Hash)0xD4636C2EDB0DEA8A, model);- Hash parameters: the named function also accepts a string and hashes it for you;
Citizen.InvokeNativeneeds the number — passjoaat("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
InvokeNativewith the hash — it always works.
Sources
alloc8or RDR3 NativeDB · VORPCORE RDR3natives
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.