SET_TRAIN_CRUISE_SPEED
Hash
0x01021EB2E96B793CRuntime name
SetTrainCruiseSpeedNamespaceVEHICLE
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x16469284DB8C62B5Signature
void SET_TRAIN_CRUISE_SPEED(Vehicle train, float speed);Parameters
| Name | Type | Description |
|---|---|---|
train | Vehicle | — |
speed | float | — |
Returns void
Usage
SetTrainCruiseSpeed(train, speed)
-- always works, by hash
Citizen.InvokeNative(0x01021EB2E96B793C, train, speed)JavaScript and C#
SetTrainCruiseSpeed(train, speed);
// by hash
Citizen.invokeNative('0x01021EB2E96B793C', train, speed + 0.0000001);Function.Call((Hash)0x01021EB2E96B793C, train, speed);- Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.