RedM Natives

_FORCE_TRAIN_WAGON_POPULATION

Enable/disable automatic ambient passenger population on a train wagon (carriage).

Hash0x119A5714578F4E05
Runtime nameForceTrainWagonPopulation
NamespaceENTITY
SideClient
NameCommunity guess
Docs
Since build1207

Signature

void _FORCE_TRAIN_WAGON_POPULATION(Entity trainWagon, BOOL toggle);

Parameters

NameTypeDescription
trainWagonEntity—
toggleBOOL—

Returns void

Description

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);
		}
	}

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
ForceTrainWagonPopulation(trainWagon, toggle)

-- always works, by hash
Citizen.InvokeNative(0x119A5714578F4E05, trainWagon, toggle)
JavaScript and C#
JavaScript
ForceTrainWagonPopulation(trainWagon, toggle);

// by hash
Citizen.invokeNative('0x119A5714578F4E05', trainWagon, toggle);
C#
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

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