-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update 0x2fa2494b47fdd009 correct name and documentation
fix indentation and typo
- Loading branch information
1 parent
35b42e8
commit 0f9e59f
Showing
2 changed files
with
35 additions
and
15 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
ns: VEHICLE | ||
aliases: ["0x2FA2494B47FDD009"] | ||
--- | ||
## SET_TRAILER_ATTACHMENT_ENABLED | ||
|
||
```c | ||
// SetTrailerAttachmentEnabled | ||
void SET_TRAILER_ATTACHMENT_ENABLED(Vehicle vehicle, BOOL enabled); | ||
``` | ||
Sets whether the trailer can attach to vehicles | ||
## Parameters | ||
* **vehicle**: The trailer to set attachment state for | ||
* **enabled**: Enable or disable attachment | ||
## Examples | ||
```lua | ||
local trailerModel = `tanker` | ||
local trailerCoordinates = vector3(-323.59, -757.83, 53.25) | ||
local trailerHeading = 247.77 | ||
RequestModel(trailerModel) | ||
while not HasModelLoaded(trailerModel) do | ||
Wait(0) | ||
end | ||
local trailerIndex = CreateVehicle(trailerModel, trailerCoordinates.x, trailerCoordinates.y, trailerCoordinates.z, trailerHeading, true, false) | ||
SetTrailerAttachmentEnabled(trailerIndex, false) | ||
SetModelAsNoLongerNeeded(trailerModel) | ||
``` |