GetVehicleTowingVehicle: Difference between revisions
Jump to navigation
Jump to search
(OOP) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | |||
{{Server client function}} | {{Server client function}} | ||
This function is used to get the vehicle that is towing another. | This function is used to get the vehicle that is towing another. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">vehicle getVehicleTowingVehicle ( vehicle theVehicle )</syntaxhighlight> | <syntaxhighlight lang="lua">vehicle getVehicleTowingVehicle ( vehicle theVehicle )</syntaxhighlight> | ||
{{OOP||[[vehicle]]:getTowingVehicle|towingVehicle}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''theVehicle''': | *'''theVehicle''': the [[vehicle]] being towed. | ||
==Returns== | ==Returns== | ||
* The vehicle that ''theVehicle'' is being towed by. | |||
* ''false'' if it isn't being towed. | |||
==Example== | ==Example== |
Latest revision as of 23:12, 17 December 2014
This function is used to get the vehicle that is towing another.
Syntax
vehicle getVehicleTowingVehicle ( vehicle theVehicle )
OOP Syntax Help! I don't understand this!
- Method: vehicle:getTowingVehicle(...)
- Variable: .towingVehicle
Required Arguments
- theVehicle: the vehicle being towed.
Returns
- The vehicle that theVehicle is being towed by.
- false if it isn't being towed.
Example
This example will create a trailer and a trailer-tower, attach them, then check if they attached.
local towingVehicle = createVehicle ( 515, 500, 500, 40 ) -- create a trailer-tower (roadtrain) local trailer = createVehicle ( 435, 500, 490, 40 ) -- create a trailer attachTrailerToVehicle ( towingVehicle, trailer ) -- attach them if ( getVehicleTowingVehicle ( trailer ) == towingVehicle ) then -- if it attached outputChatBox ( "The vehicles were attached!" ) end
See Also
- addVehicleUpgrade
- attachTrailerToVehicle
- blowVehicle
- createVehicle
- detachTrailerFromVehicle
- fixVehicle
- getOriginalHandling
- getTrainDirection
- getTrainPosition
- getTrainSpeed
- getTrainTrack
- getVehicleColor
- getVehicleCompatibleUpgrades
- getVehicleController
- getVehicleDoorOpenRatio
- getVehicleDoorState
- getVehicleEngineState
- getVehicleHandling
- getVehicleHeadLightColor
- getVehicleLandingGearDown
- getVehicleLightState
- getVehicleMaxPassengers
- getVehicleModelFromName
- getVehicleName
- getVehicleNameFromModel
- getVehicleOccupant
- getVehicleOccupants
- getVehicleOverrideLights
- getVehiclePaintjob
- getVehiclePanelState
- getVehiclePlateText
- getVehicleSirenParams
- getVehicleSirens
- getVehicleSirensOn
- getVehicleTowedByVehicle
- getVehicleTowingVehicle
- getVehicleTurretPosition
- getVehicleType
- getVehicleUpgradeOnSlot
- getVehicleUpgradeSlotName
- getVehicleUpgrades
- getVehicleVariant
- getVehicleWheelStates
- isTrainDerailable
- isTrainDerailed
- isVehicleBlown
- isVehicleDamageProof
- isVehicleFuelTankExplodable
- isVehicleLocked
- isVehicleOnGround
- isVehicleTaxiLightOn
- removeVehicleUpgrade
- setTrainDerailable
- setTrainDerailed
- setTrainDirection
- setTrainPosition
- setTrainSpeed
- setTrainTrack
- setVehicleColor
- setVehicleDamageProof
- setVehicleDoorOpenRatio
- setVehicleDoorState
- setVehicleDoorsUndamageable
- setVehicleEngineState
- setVehicleFuelTankExplodable
- setVehicleHandling
- setVehicleHeadLightColor
- setVehicleLandingGearDown
- setVehicleLightState
- setVehicleLocked
- setVehicleOverrideLights
- setVehiclePaintjob
- setVehiclePanelState
- setVehiclePlateText
- setVehicleSirens
- setVehicleSirensOn
- setVehicleTaxiLightOn
- setVehicleTurretPosition
- setVehicleVariant
- setVehicleWheelStates