ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setTrainTrack

Function

setTrainTrack

ServerVehiclesIdentical to MTA:SA

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.

See also