RedM Natives

TASK_RIDE_TRAIN

Hash0x37FB1C870E2EC2C6
Runtime nameTaskRideTrain
NamespaceTASK
SideClient
NameOfficial
Docs
Since build1207

Signature

void TASK_RIDE_TRAIN(Ped ped, Vehicle train, int scenarioPoint, Hash scenarioHash);

Parameters

NameTypeDescription
pedPed—
trainVehicle—
scenarioPointint—
scenarioHashHash—

Returns void

Usage

Lua
TaskRideTrain(ped, train, scenarioPoint, scenarioHash)

-- always works, by hash
Citizen.InvokeNative(0x37FB1C870E2EC2C6, ped, train, scenarioPoint, scenarioHash)
JavaScript and C#
JavaScript
TaskRideTrain(ped, train, scenarioPoint, scenarioHash);

// by hash
Citizen.invokeNative('0x37FB1C870E2EC2C6', ped, train, scenarioPoint, scenarioHash);
C#
Function.Call((Hash)0x37FB1C870E2EC2C6, ped, train, scenarioPoint, scenarioHash);
  • 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`.

Sources

alloc8or RDR3 NativeDB

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