-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
6 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,29 @@ | ||
--- | ||
title: GetVehicleCab | ||
description: Get the ID of the trailer attached to a vehicle. | ||
description: Get the ID of the cab attached to a vehicle. | ||
tags: ["vehicle"] | ||
--- | ||
|
||
<VersionWarn version='omp v1.1.0.2612' /> | ||
|
||
## Description | ||
|
||
Get the ID of the trailer attached to a vehicle. | ||
Get the ID of the cab attached to a vehicle. | ||
|
||
| Name | Description | | ||
| --------- | -------------------------------------------- | | ||
| vehicleid | The ID of the vehicle to get the trailer of. | | ||
| vehicleid | The ID of the vehicle to get the cab of. | | ||
|
||
## Returns | ||
|
||
The vehicle ID of the trailer or 0 if no trailer is attached. | ||
The vehicle ID of the cab or **0** if no cab is attached. | ||
|
||
## Examples | ||
|
||
```c | ||
new | ||
trailerId = GetVehicleCab(vehicleid); | ||
DetachTrailerFromVehicle(trailerId); | ||
new cabId = GetVehicleCab(vehicleid); | ||
``` | ||
|
||
## Notes | ||
:::warning | ||
This function does not work for trains. | ||
::: | ||
## Related Functions | ||
|
||
- [AttachTrailerToVehicle](AttachTrailerToVehicle): Attach a trailer to a vehicle. | ||
- [DetachTrailerFromVehicle](DetachTrailerFromVehicle): Detach a trailer from a vehicle. | ||
- [IsTrailerAttachedToVehicle](IsTrailerAttachedToVehicle): Check if a trailer is attached to a vehicle. | ||
- [GetVehicleTrailer](GetVehicleTrailer): Get the ID of the trailer attached to a vehicle. |