GetTrainTrack: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (make something clearer)
m (shared)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Client function}}
{{Shared function}}
{{New feature/item|3.0160|1.6|7485|
{{New feature/item|3.0160|1.6|7485|
Gets the track of a train
Gets the track of a train

Revision as of 19:48, 29 December 2015

Gets the track of a train

Syntax

int getTrainTrack ( vehicle train )

OOP Syntax Help! I don't understand this!

Method: vehicle:getTrack(...)
Variable: .track
Counterpart: setTrainTrack


Required Arguments

  • train: the train of which to get the track.

Returns

Returns an integer (whole number) that represents the train track, false if there is problem with train element.

Example

addCommandHandler("getTrain",
function ()
	local thePlayer = getLocalPlayer()
	local theVehicle = getPedOccupiedVehicle(thePlayer)
	train = getTrainTrack(theVehicle)
	outputChatBox("Train Track is "..train)
end)

See Also