# qs-housing

1. Navigate to the path **qs-housing/config/config.lua**
2. Find the `Config.Garages` option and customize:

```lua
Config.Garage = 'vms_garagesv2'
```

3. Navigate to the **qs-housing/client/custom/garages/**
4. Create file **vms\_garagesv2.lua** inside **qs-housing/client/custom/garages/**
5. Paste the following code into the **qs-housing/client/custom/garages/vms\_garagesv2.lua** file

<details>

<summary><strong>qs-housing/client/custom/garages/vms_garagesv2.lua</strong></summary>

{% code lineNumbers="true" %}

```lua
if Config.Garage ~= 'vms_garagesv2' then
    return
end

function TriggerHouseUpdateGarage()
    return
end

CreateThread(function()
    while true do
        Wait(0)
        local ped = PlayerPedId()
        local pos = GetEntityCoords(PlayerPedId())
        if ped and CurrentHouse ~= nil and CurrentHouseData.haskey and Config.Houses and Config.Houses[CurrentHouse] and Config.Houses[CurrentHouse].garage then
            local dist = #(pos - vector3(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z))
            if dist < 5.0 then
                DrawMarker(20, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.3, 0.15, 120, 10, 20, 155, false, false, false, 1, false, false, false)
                if dist < 2.0 then
                    local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
                    if Config.Houses[CurrentHouse].garage and Config.Houses[CurrentHouse].garage.x and Config.Houses[CurrentHouse].garage.y and Config.Houses[CurrentHouse].garage.z then
                        if vehicle and vehicle ~= 0 then
                            if Config.HelpNotification == 'ShowHelpNotification' then
                                ShowHelpNotification(Lang('HOUSING_SHOWHELP_GARAGE_STORE'))
                            elseif Config.HelpNotification == 'DrawText3D' then
                                DrawText3Ds(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, Lang('HOUSING_DRAWTEXT_GARAGE_STORE'))
                            end

                            if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
                                exports['vms_garagesv2']:enterHouseGarage()
                            end
                        else
                            if Config.HelpNotification == 'ShowHelpNotification' then
                                ShowHelpNotification(Lang('HOUSING_SHOWHELP_GARAGE_MENU'))
                            elseif Config.HelpNotification == 'DrawText3D' then
                                DrawText3Ds(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, Lang('HOUSING_DRAWTEXT_GARAGE_STORE'))
                            end

                            if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
                                exports['vms_garagesv2']:enterHouseGarage()
                            end
                        end
                    end
                end
            else
                Wait(1000)
            end
        end
    end
end)

```

{% endcode %}

</details>

6. Navigate to the **qs-housing/server/custom/garages/**
7. Create file **vms\_garagesv2.lua** inside **qs-housing/server/custom/garages/**
8. Paste the following code into the **qs-housing/server/custom/garages/vms\_garagesv2.lua** file

<details>

<summary><strong>qs-housing/server/custom/garages/vms_garagesv2.lua</strong></summary>

{% code lineNumbers="true" %}

```lua
if Config.Garage ~= 'vms_garagesv2' then
    return
end

function TriggerAddHouseGarage(house, garageInfo)
    return
end

function TriggerHouseUpdateGarage(garages)
    return
end
```

{% endcode %}

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.vames-store.com/assets/vms_garagesv2/compatibility/housings/qs-housing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
