For the complete documentation index, see llms.txt. This page is also available as Markdown.

Installation

1. Drop in the resource

Place the rm_dualgun folder in your resources directory and add it to server.cfg after your framework, ox_lib and your inventory:

ensure ox_lib
ensure oxmysql
ensure ox_inventory      # or your inventory
ensure rm_dualgun

2. Add the items

Open the [items] folder and copy the block that matches your inventory:

Inventory
File
Where it goes

ox_inventory

items - ox_inventory.lua

ox_inventory/data/items.lua

qb-inventory / qs / origen / ak47

items - qb shared.lua

qb-core/shared/items.lua

Database-backed inventories

items.sql

Run against your database

Each file contains 39 weapon items and 10 ammo items. See Items for the full list and image requirements.


3. Ammo storage

Nothing to do if your inventory supports metadata. The script detects it and stores ammo on the item.

If it does not, the script falls back to SQL and creates its own table on first start. You can also run it manually:

See Ammo System for how the two modes differ.


4. Verify

Start the server and check the console. You should see one line like:

Then in game:

This spawns a dual gun with full ammo, bypassing item ownership. Hold the aim button and both hands should raise with the weapons attached.

/useDual is a testing command that ignores your inventory. It is the fastest way to confirm animations and attachment work before wiring up items.


5. Controls

Input
Action

Mouse wheel click

Aim (raises both weapons)

Left click

Fire left gun, or both in unified mode

Right click

Fire right gun, or aim only in unified mode

X

Toggle fire mode

M

Put the dual guns away

Keybinds are registered through ox_lib, so players can rebind X and M in the FiveM keybind settings.

Last updated