Skip to content

Commit

Permalink
Update 0x2fa2494b47fdd009 correct name and documentation (#1220)
Browse files Browse the repository at this point in the history
  • Loading branch information
NotSomething0 authored Jan 24, 2025
1 parent 48724b1 commit 938531e
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
// 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)
```

0 comments on commit 938531e

Please sign in to comment.