Skip to content

Commit 938531e

Browse files
Update 0x2fa2494b47fdd009 correct name and documentation (#1220)
1 parent 48724b1 commit 938531e

File tree

2 files changed

+35
-15
lines changed

2 files changed

+35
-15
lines changed

VEHICLE/N_0x2fa2494b47fdd009.md

-15
This file was deleted.
+35
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+
// 0x2FA2494B47FDD009
9+
void SET_TRAILER_ATTACHMENT_ENABLED(Vehicle vehicle, cs_type(Any) BOOL enabled);
10+
```
11+
12+
Sets whether the trailer can attach to vehicles
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 = `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)