RedM Natives

_SET_MISSION_TRAIN_WARP_TO_COORDS

Can be used to rotate the train by setting the BOOL direction

Hash0xC9EA26893C9E4024
Runtime nameSetMissionTrainWarpToCoords
NamespaceVEHICLE
SideClient
NameCommunity guess
Docs
Since build1207

Signature

void _SET_MISSION_TRAIN_WARP_TO_COORDS(Vehicle train, float x, float y, float z, BOOL direction);

Parameters

NameTypeDescription
trainVehicle—
xfloat—
yfloat—
zfloat—
directionBOOL—

Returns void

Description

Notice: BOOL p4 was wrongly named takePassengers (?)
Can be used to rotate the train by setting the BOOL direction

Usage

Lua
SetMissionTrainWarpToCoords(train, x, y, z, direction)

-- always works, by hash
Citizen.InvokeNative(0xC9EA26893C9E4024, train, x, y, z, direction)
JavaScript and C#
JavaScript
SetMissionTrainWarpToCoords(train, x, y, z, direction);

// by hash
Citizen.invokeNative('0xC9EA26893C9E4024', train, x + 0.0000001, y + 0.0000001, z + 0.0000001, direction);
C#
Function.Call((Hash)0xC9EA26893C9E4024, train, x, y, z, direction);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.
  • 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

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