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

Function

setTrainDerailed

ServerVehiclesIdentical to MTA:SA

Stores whether a train is derailed.

Syntax

bool setTrainDerailed(vehicle element, bool value)

Arguments

elementvehicle
The train (locomotive or carriage).
valuebool
true = derailed.

Returns

true on success.

Example

local train = createVehicle(538, 1700, -1950, 14)
setTrainDerailed(train, true)

Notes

State for scripts. Trains in the game do not react to this or the other train functions yet (setTrainSpeed, setTrainTrack, setTrainPosition, setTrainDirection, setTrainDerailable); the values are stored on the server.

See also