> For the complete documentation index, see [llms.txt](https://docs.rytrak.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rytrak.fr/scripts/advanced-tactical-gas-system/compatibility-with-qbcore.md).

# Compatibility with QBCore

This guide explains how to make the **Advanced Tactical Gas System** fully compatible with **QBCore** and ensure the new grenades (Stun, Smoke, and Tear Gas) function correctly in your framework and weapon logic.

***

### 1. Follow the Main Integration Guide

Start by following our core documentation:\
➡️ [**Add a Custom Weapon on QBCore**](/framework-compatibility/add-a-custom-weapon-on-qbcore.md)

***

### 2. Update the `qb-weapons` Resource

To ensure proper logic and grenade handling, you must update the **`qb-weapons`** resource:

#### Step-by-Step:

1. Navigate to:

```
qb-weapons/client/main.lua
```

2. Scroll to **line 129**, where the throwable weapons are listed inside a conditional statement.
3. **Modify the line** to include the custom grenade weapon names:

#### Original Line:

```lua
elseif weaponName == 'weapon_stickybomb' or weaponName == 'weapon_pipebomb' or weaponName == 'weapon_smokegrenade' or weaponName == 'weapon_flare' or weaponName == 'weapon_proxmine' or weaponName == 'weapon_ball' or weaponName == 'weapon_molotov' or weaponName == 'weapon_grenade' or weaponName == 'weapon_bzgas' then
```

#### Modified Line (add the new grenades):

```lua
elseif weaponName == 'weapon_stickybomb' or weaponName == 'weapon_pipebomb' or weaponName == 'weapon_smokegrenade' or weaponName == 'weapon_flare' or weaponName == 'weapon_proxmine' or weaponName == 'weapon_ball' or weaponName == 'weapon_molotov' or weaponName == 'weapon_grenade' or weaponName == 'weapon_bzgas' or weaponName == 'weapon_grenade_stun' or weaponName == 'weapon_grenade_smoke' or weaponName == 'weapon_grenade_teargas' then
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.rytrak.fr/scripts/advanced-tactical-gas-system/compatibility-with-qbcore.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
