- Documentation
- Server functions
- setTrainTrack
Function
setTrainTrack
Stores the number of the track the train runs on.
Syntax
bool setTrainTrack(vehicle train, int track)Arguments
trainvehicle- The train.
trackint- Track number (0-3).
Returns
true on success.
Example
local train = createVehicle(538, 1700, -1950, 14)
setTrainTrack(train, 1)
Notes
State for scripts. See setTrainDerailed.