# Step 2 - \[QB-Core] Changes

{% hint style="info" %}
To make everything work with QB-Core you have to add some code to qb-menu.

Add "TriggerEvent("gp\_taxSystem:closeMenu")" like shown below
{% endhint %}

{% code title="qb-menu/client/main.lua" lineNumbers="true" %}

```lua
local function closeMenu()
    sendData = nil
    headerShown = false
    TriggerEvent("gp_taxSystem:closeMenu")
    SetNuiFocus(false)
    SendNUIMessage({
        action = 'CLOSE_MENU'
    })
end
```

{% endcode %}

{% code title="qb-menu/client/main.lua" lineNumbers="true" %}

```lua
RegisterNUICallback('closeMenu', function(_, cb)
    headerShown = false
    sendData = nil
    SetNuiFocus(false)
    TriggerEvent("gp_taxSystem:closeMenu")
    cb('ok')
end)
```

{% endcode %}


---

# 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.gpscripts.dev/tax-system/installation/step-2-qb-core-changes.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.
