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

Function

setTrainDirection

ServerVehiclesIdentical to MTA:SA

Stores the direction in which a train travels along the track.

Syntax

bool setTrainDirection(vehicle element, bool value)

Arguments

elementvehicle
The train.
valuebool
true = along the track direction, false = the opposite way.

Returns

true on success.

Example

local train = createVehicle(538, 1700, -1950, 14)
setTrainDirection(train, false)

Notes

State for scripts. See setTrainDerailed.

See also