# ENTITY::_SEARCH_BUILDING_POOL_FOR_ENTITY_WITH_THIS_MODEL

- **Hash:** `0x66B2B83B94B22458`
- **Namespace:** ENTITY
- **Runtime name (Lua/JS):** `SearchBuildingPoolForEntityWithThisModel`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/ENTITY/_SEARCH_BUILDING_POOL_FOR_ENTITY_WITH_THIS_MODEL

## Signature

```c
Entity _SEARCH_BUILDING_POOL_FOR_ENTITY_WITH_THIS_MODEL(Hash modelHash);
```

## Parameters

- `modelHash` (`Hash`)

## Returns

`Entity`

## Description

*Source: alloc8or RDR3 NativeDB*

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

*Source: femga rdr3_discoveries*

```
    // 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

```lua
local retval = SearchBuildingPoolForEntityWithThisModel(modelHash)

-- always available, by hash
local retval = Citizen.InvokeNative(0x66B2B83B94B22458, modelHash, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = SearchBuildingPoolForEntityWithThisModel(modelHash);

// by hash
const retval = Citizen.invokeNative('0x66B2B83B94B22458', modelHash, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
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.*
