GetTrainTrack

From Multi Theft Auto: Wiki
Revision as of 02:10, 18 March 2019 by LordHenry (talk | contribs)
Jump to navigation Jump to search

Edit-delete.png This page is marked for deletion.

Reason: This function doesn't exist anymore.
Actions: Delete (Administrators) - Discuss - What links here - Category

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("traintrack",
function (player)
   if isPedInVehicle (player) then
      local theVehicle = getPedOccupiedVehicle(player)
      if getVehicleType(theVehicle) == "Train" then
	  local track = getTrainTrack(theVehicle)
	  outputChatBox("Train Track is "..track,player,0,255,0)
      end
   end
end
)

See Also