- Documentation
- Server functions
- getTrainSpeed
Function
getTrainSpeed
Returns the speed stored with setTrainSpeed (0 by default).
Syntax
float getTrainSpeed(vehicle train)Arguments
trainvehicle- The train.
Returns
The stored speed.
Example
local train = createVehicle(538, 1700, -1950, 14)
outputDebugString(getTrainSpeed(train))