AttachTrailerToVehicle: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server client function}} | {{Server client function}} | ||
This function attaches a trailer | This function attaches a trailer type vehicle to a trailer-towing-type vehicle. | ||
==Syntax== | ==Syntax== | ||
Line 11: | Line 11: | ||
==Returns== | ==Returns== | ||
Returns 'true' if the vehicle's were successfully attached, 'false' otherwise. | Returns ''true'' if the vehicle's were successfully attached, ''false'' otherwise. | ||
==Example== | ==Example== | ||
This example will create a trailer and a trailer | This example will create a trailer and a trailer tower, then attach them. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
newvehicle = createVehicle ( 515, 500, 500, 40 ) -- create a trailer tower (roadtrain) | |||
trailer = createVehicle ( 435, 500, 505, 40 ) -- create a trailer | trailer = createVehicle ( 435, 500, 505, 40 ) -- create a trailer | ||
attachTrailerToVehicle ( | attachTrailerToVehicle ( newvehicle, trailer ) -- attach them | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Vehicle functions}} | {{Vehicle functions}} |
Revision as of 14:52, 21 August 2007
This function attaches a trailer type vehicle to a trailer-towing-type vehicle.
Syntax
bool attachTrailerToVehicle ( vehicle theVehicle, vehicle theTrailer )
Required Arguments
- theVehicle: The vehicle you wish to attach a trailer to.
- theTrailer: The trailer you wish to be attached.
Returns
Returns true if the vehicle's were successfully attached, false otherwise.
Example
This example will create a trailer and a trailer tower, then attach them.
newvehicle = createVehicle ( 515, 500, 500, 40 ) -- create a trailer tower (roadtrain) trailer = createVehicle ( 435, 500, 505, 40 ) -- create a trailer attachTrailerToVehicle ( newvehicle, trailer ) -- attach them
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