# ENTITY::_IS_TRAIN_INTERIOR_LOADED

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

## Signature

```c
BOOL _IS_TRAIN_INTERIOR_LOADED(Entity entity);
```

## Parameters

- `entity` (`Entity`)

## Returns

`BOOL`

## Description

*Source: alloc8or RDR3 NativeDB*

Checks whether the entity's interior is currently loaded by the game engine.
Mainly used for train carriages. The game can unload distant carriage interiors as an optimization when the player is far away or not standing on the train.

*Source: VORPCORE RDR3natives*

Checks whether the entity's interior is currently loaded by the game engine.
This is mainly used for train carriages. When the player is far away or not standing on the train, the game unloads interiors of distant carriages as an optimization. If the interior of the entity is currently loaded, this native returns true

## Usage

### Lua

```lua
local retval = IsTrainInteriorLoaded(entity)

-- always available, by hash
local retval = Citizen.InvokeNative(0xC2E71D7E0A7B4C89, entity, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const retval = IsTrainInteriorLoaded(entity);

// by hash
const retval = Citizen.invokeNative('0xC2E71D7E0A7B4C89', entity, Citizen.returnResultAnyway());
```

### C#

```csharp
bool retval = Function.Call<bool>((Hash)0xC2E71D7E0A7B4C89, entity);
```

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