Skip to content

[BUG] Wardrobe furniture blocking clothing menu view #132

@zzjrzz

Description

@zzjrzz

Describe the bug
When opening the wardrobe inside player's apartment, the view is blocked by the back of the wardrobe object.

To Reproduce
Steps to reproduce the behavior:

  1. Go to player apartment
  2. Target the wardrobe
  3. Select "change outfit"

Expected behavior
The PED turns around when there is an object blocking the view for the clothes menu

Suggested Solution

local function TurnAroundPed()
    local playerPed = PlayerPedId()
    local currentHeading = GetEntityHeading(playerPed)
    local newHeading = currentHeading + 180.0
    SetEntityHeading(playerPed, newHeading)
end

RegisterNetEvent('apartments:client:ChangeOutfit', function()
    TriggerServerEvent('InteractSound_SV:PlayOnSource', 'Clothes1', 0.4)
    -- Turn the ped around before opening clothing menu
    TurnAroundPed()
    -- Short wait to ensure the turn completes before opening menu
    Wait(100)
    TriggerEvent('qb-clothing:client:openOutfitMenu')
end)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions