Skip to content

Commit

Permalink
Update 0x2fa2494b47fdd009 correct name and documentation
Browse files Browse the repository at this point in the history
fix indentation and typo
  • Loading branch information
NotSomething0 committed Nov 15, 2024
1 parent 35b42e8 commit 0f9e59f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 15 deletions.
15 changes: 0 additions & 15 deletions VEHICLE/N_0x2fa2494b47fdd009.md

This file was deleted.

35 changes: 35 additions & 0 deletions VEHICLE/SetTrailerAttachmentEnabled.md
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)
```

0 comments on commit 0f9e59f

Please sign in to comment.