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

Function

getTrainPosition

ServerVehiclesIdentical to MTA:SA

Returns the track position stored with setTrainPosition (0 by default).

Syntax

float getTrainPosition(vehicle train)

Arguments

trainvehicle
The train.

Returns

The stored distance.

Example

local train = createVehicle(538, 1700, -1950, 14)
outputDebugString(getTrainPosition(train))

See also