> For the complete documentation index, see [llms.txt](https://docs.rainmad.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rainmad.com/resources/gta-dual-wield-two-handed-weapons/reference/troubleshooting.md).

# Troubleshooting

### Nothing happens when I use the item

**Check the item name matches the config key exactly.**

The item name, the `cfg.weapons` key and the image filename must all be identical. This is the cause of the large majority of reports.

```lua
cfg.weapons = {
    rm_appistol_dual = { ... }   -- config key
}
```

```lua
['rm_appistol_dual'] = { ... }   -- item name, must match
```

Then confirm:

* The item is `useable = true` (qb) or has the `client.event` line (ox).
* `consume = 0` on ox\_inventory, otherwise the item is eaten instead of toggled.
* `/useDual rm_appistol_dual` works. If it does, the problem is the item, not the script.

***

### Ammo resets every time I reconnect

Check the ammo mode line printed at start-up:

```
[rm_dualgun] ammo persistence: sql mode (inventory=none)
```

`inventory=none` means no inventory bridge bound. Either your inventory started after `rm_dualgun`, or `cfg.inventory` points at something that is not running.

In SQL mode, also confirm `getPlayerIdentifier` returns a **stable** value. A session-scoped identifier produces a new database row on every reconnect.

***

### Ammo doesn't travel with the item

Expected in SQL mode: ammo is bound to the player, not the item.

For ammo that follows the item when dropped or traded you need metadata mode, which requires a metadata-capable inventory. See Ammo System.

***

### Players are being kicked for flooding

See Rate Limits. In short: confirm the kick actually mentions state bags, then check the convar survived start-up:

```
> get rateLimiter_stateBagFlood_rate
```

If it is not 500 or higher, another resource is resetting it after `rm_dualgun` starts.

***

### Other players see the wrong pose, or no weapons

Almost always a streaming issue.

1. Confirm the `stream/` folder is intact and the resource has full read access.
2. Have the affected player rejoin, which forces a fresh sync.
3. Check for another resource that overrides player animations or movement clipsets while weapons are drawn.

***

### Shots don't seem to do damage

Work through these in order:

1. **Is PvP enabled on your server at all?** Test with a normal weapon first.
2. **Is another resource lowering AI weapon damage?** Many anti-grief scripts set a global damage modifier. `rm_dualgun` sets its own at start-up, so anything loading **after** it wins. Move `rm_dualgun` later in `server.cfg`.
3. **Are damage-blocking flags active?** Godmode, admin invincibility and revive states all block damage silently.

If none apply, enable diagnostics and collect output:

```lua
cfg.debug = true
```

Restart the resource, have **both** players open F8, then:

* Both run `/dualdiag` and copy the output.
* The shooter fires a few rounds at the other player.
* Both copy everything printed to their console.

Send all four blocks with your support ticket. That output distinguishes an aiming problem from a damage problem immediately, which is otherwise guesswork.

{% hint style="warning" %}
Turn `cfg.debug` back off afterwards. It prints on every shot: a minigun produces about 33 lines per second.
{% endhint %}

***

### Explosive duals kill the user

Working as intended. Firing an RPG, firework or grenade launcher at something a few metres away puts you inside your own blast, exactly as a vanilla launcher would.

If you want them to be more forgiving on your server, raise `shot_interval` so players cannot panic-fire at their feet, or remove the explosive entries from `cfg.weapons`.

***

### A new weapon I added does nothing

1. `weaponHash` must match `weapon`. A mismatch means that hand ends up holding the wrong gun, or nothing.
2. The item must exist in your inventory with the same name.
3. `animSet` must be one of: `small`, `gang`, `long`, `mg`, `mini`, `rpg`.
4. `ammo` must point at an ammo item that actually exists.

Test with `/useDual <yourNewKey>` to rule out the inventory entirely.

***

### Weapons stay attached after death or a vehicle

The dual guns are put away automatically when the player dies, enters a vehicle, starts swimming, climbs, or ragdolls. If they persist through any of these, another resource is likely overriding the player ped in a way that hides the state change. Check for revive and animation scripts.

***

### Reporting a bug

Include:

* Your framework and inventory, and the ammo mode line from start-up.
* The weapon key involved.
* `/dualdiag` output from every player involved.
* Console output with `cfg.debug = true` if it is a damage or sync issue.
