RedM Natives

_SEARCH_BUILDING_POOL_FOR_ENTITY_WITH_THIS_MODEL

Alternative Name: _GET_ENTITY_FROM_MAP_OBJECT; You can get existing objects and manipulate them using this native.

Hash0x66B2B83B94B22458
Runtime nameSearchBuildingPoolForEntityWithThisModel
NamespaceENTITY
SideClient
NameCommunity guess
Docs
Since build1207

Signature

Entity _SEARCH_BUILDING_POOL_FOR_ENTITY_WITH_THIS_MODEL(Hash modelHash);

Parameters

NameTypeDescription
modelHashHash—

Returns Entity

Description

alloc8or RDR3 NativeDB

Alternative Name: _GET_ENTITY_FROM_MAP_OBJECT; You can get existing objects and manipulate them using this native.

femga rdr3_discoveries · research notes

    // 0x66B2B83B94B22458
_GET_ENTITY_FROM_MAP_OBJECT(map_object hash)
        SOME FLAGS:
   //SET_PED_CONFIG_FLAG        Citizen.InvokeNative(0x1913FE4CBF41C463,created_object, 263, true); -- headshot immunity

Usage

Lua
local retval = SearchBuildingPoolForEntityWithThisModel(modelHash)

-- always works, by hash
local retval = Citizen.InvokeNative(0x66B2B83B94B22458, modelHash, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = SearchBuildingPoolForEntityWithThisModel(modelHash);

// by hash
const retval = Citizen.invokeNative('0x66B2B83B94B22458', modelHash, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x66B2B83B94B22458, modelHash);
  • 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 · femga rdr3_discoveries

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