Skip to content

Commit 9f42eeb

Browse files
committed
Update 0x2fa2494b47fdd009 correct name and documentation
1 parent 35b42e8 commit 9f42eeb

File tree

2 files changed

+35
-15
lines changed

2 files changed

+35
-15
lines changed

VEHICLE/N_0x2fa2494b47fdd009.md

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
ns: VEHICLE
3+
aliases: ["0x2FA2494B47FDD009"]
4+
---
5+
## SET_TRAILER_ATTACHMENT_ENABLED
6+
7+
```c
8+
// SetTrailerAttachmentEnabled
9+
void SET_TRAILER_ATTACHMENT_ENABLED(Vehicle vehicle, BOOL enabled);
10+
```
11+
12+
Sets whether the a trailer can attach to vehicles or not
13+
14+
## Parameters
15+
* **vehicle**: The trailer to set attachment state for
16+
* **enabled**: Enable or disable attachment
17+
18+
## Examples
19+
20+
```lua
21+
local trailerModel = GetHashKey('tanker')
22+
local trailerCoordinates = vector3(-323.59, -757.83, 53.25)
23+
local trailerHeading = 247.77
24+
25+
RequestModel(trailerModel)
26+
27+
while not HasModelLoaded(trailerModel) do
28+
Wait(0)
29+
end
30+
31+
local trailerIndex = CreateVehicle(trailerModel, trailerCoordinates.x, trailerCoordinates.y, trailerCoordinates.z, trailerHeading, true, false)
32+
33+
SetTrailerAttachmentEnabled(trailerIndex, false)
34+
SetModelAsNoLongerNeeded(trailerModel)
35+
```

0 commit comments

Comments
 (0)