# ENTITY::_FORCE_TRAIN_WAGON_POPULATION

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

## Signature

```c
void _FORCE_TRAIN_WAGON_POPULATION(Entity trainWagon, BOOL toggle);
```

## Parameters

- `trainWagon` (`Entity`)
- `toggle` (`BOOL`)

## Returns

`void`

## Description

*Source: alloc8or RDR3 NativeDB*

Enable/disable automatic ambient passenger population on a train wagon (carriage).
	- toggle=true: wagon is kept populated; removed/deleted passengers are replaced quickly.
	- toggle=false: stop auto-filling; after removing passengers, no new peds spawn until re-enabled.

Notes:
	- Intended for train carriage entities (wagons) obtained from a train (e.g., VEHICLE::GET_TRAIN_CARRIAGE).
	- Often used with passenger collection via VEHICLE::_GET_ALL_WAGON_PASSENGERS.

Example (from scripts):
	for (int i = 0; i < VEHICLE::_GET_NUM_CARS_FROM_TRAIN_CONFIG(trainConfig); ++i) {
		Vehicle wagon = VEHICLE::GET_TRAIN_CARRIAGE(train, i);
		if (ENTITY::DOES_ENTITY_EXIST(wagon) && !ENTITY::IS_ENTITY_DEAD(wagon)) {
			ENTITY::_FORCE_TRAIN_WAGON_POPULATION(wagon, true);
		}
	}

*Source: VORPCORE RDR3natives*

Enables or disables automatic passenger population on a specific train wagon (carriage).

When toggle == true, the game keeps this wagon filled with ambient passengers.
If a passenger ped is deleted or removed from the wagon, a new ped is spawned almost
immediately to occupy that seat.

When toggle == false, the engine stops auto-filling this wagon. After you delete or
remove the existing passengers, no new peds will spawn for that wagon until you enable
it again with true.

## Usage

### Lua

```lua
ForceTrainWagonPopulation(trainWagon, toggle)

-- always available, by hash
Citizen.InvokeNative(0x119A5714578F4E05, trainWagon, toggle)
```

### JavaScript

```js
ForceTrainWagonPopulation(trainWagon, toggle);

// by hash
Citizen.invokeNative('0x119A5714578F4E05', trainWagon, toggle);
```

### C#

```csharp
Function.Call((Hash)0x119A5714578F4E05, trainWagon, toggle);
```

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