Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
// 0x2FA2494B47FDD009
void SET_TRAILER_ATTACHMENT_ENABLED(Vehicle vehicle, cs_type(Any) 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)
```
Loading