SET_TRAIN_SPEED
Sets the current speed of train.
Signature
void SET_TRAIN_SPEED(Vehicle train, float speed); // 0xDFBA6BBFF7CCAFBB b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | train | Vehicle |
| 2 | speed | float |
Facts
| Name | SET_TRAIN_SPEED |
|---|---|
| Hash | 0xDFBA6BBFF7CCAFBB |
| Namespace | |
| Returns | void |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
Citizen.InvokeNative(0xDFBA6BBFF7CCAFBB, -- SET_TRAIN_SPEED
0, -- Vehicle train
0.0 -- float speed
)// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
Citizen.invokeNative("0xDFBA6BBFF7CCAFBB", // SET_TRAIN_SPEED
0, // Vehicle train
0.0 // float speed
);Function.Call((Hash)0xDFBA6BBFF7CCAFBB, // SET_TRAIN_SPEED
0, // Vehicle train
0.0f // float speed
);Related VEHICLE natives
- SET_TRAIN_CRUISE_SPEED
- SET_TRAIN_OFFSET_FROM_STATION
- _SET_TRAIN_MAX_SPEED
- SET_MISSION_TRAIN_AS_NO_LONGER_NEEDED
- SET_MISSION_TRAIN_COORDS
- SET_PLAYBACK_SPEED
- SET_VEHICLE_FORWARD_SPEED
- SET_VEHICLE_LIMIT_SPEED_WHEN_PLAYER_INACTIVE
- _GET_TRAIN_MODEL_FROM_TRAIN_CONFIG_BY_CAR_INDEX
- _GET_TRAIN_TRACK_FROM_TRAIN_VEHICLE
- _SET_DRAFT_VEHICLE_DESIRED_SPEED
- _SET_MISSION_TRAIN_WARP_TO_COORDS
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.