diff --git a/VEHICLE/N_0x2fa2494b47fdd009.md b/VEHICLE/N_0x2fa2494b47fdd009.md deleted file mode 100644 index a945606c6..000000000 --- a/VEHICLE/N_0x2fa2494b47fdd009.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -ns: VEHICLE ---- -## _0x2FA2494B47FDD009 - -```c -// 0x2FA2494B47FDD009 -void _0x2FA2494B47FDD009(Any p0, Any p1); -``` - - -## Parameters -* **p0**: -* **p1**: - diff --git a/VEHICLE/SetTrailerAttachmentEnabled.md b/VEHICLE/SetTrailerAttachmentEnabled.md new file mode 100644 index 000000000..99d25d935 --- /dev/null +++ b/VEHICLE/SetTrailerAttachmentEnabled.md @@ -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) +``` \ No newline at end of file