Weapon Attachments
Why this guide exists
In GTA V, each weapon has different component IDs for the same attachment type. For example:
A suppressor for a Pistol uses
COMPONENT_AT_PI_SUPPA suppressor for a Combat Pistol uses
COMPONENT_AT_PI_SUPP_02
The inventory system simplifies this: You can create ONE item (like "suppressor") that automatically works with all compatible weapons by mapping multiple component IDs to it
Step-by-step guide
Step 1: Check if the item exists
First, check if an item for your attachment type already exists in your database
For vanilla GTA weapons:
Most common attachments (suppressor, extended clip, flashlight, etc.) should already exist
Use
/inventorycommand in-game to check existing items
For modded weapons:
You'll need to create a new item OR add the modded weapon's component hash to an existing item
Example: If you have a modded AK47 with a suppressor, you can add its suppressor hash to the existing "suppressor" item
Creating/Editing the item:
Open the inventory management UI (
/inventory)Create a new item or edit an existing one
IMPORTANT: Set the correct item type:
barrelfor suppressors, muzzle brakesclipfor magazinesscopefor sights and opticsflashlightfor tactical lightsgripfor foregrips

Step 2: Add component hashes
Now you need to add the component hash(es) that this item should apply to weapons
Where to find component hashes:
For vanilla GTA weapons:
Check the wiki
Or search online for "GTA V weapon components list"
For modded weapons:
Most likely your modded weapon script contains a text file, with the component hashes
An example for component names, may be that they start with
COMPONENT_Contact the weapon's creator/documentation if you can't find it
How to add them:
In the item edit screen for the attachment item, find the "Component Hashes" section
Click "Add Component Hash"
Enter the component hash (e.g.,
COMPONENT_AT_PI_SUPP)Repeat for all components you want this attachment to work with

Step 3: Test in-game
Give yourself the attachment item:
/giveitem [your_id] [item_name] 1or through omnipack (F1while inventory is open)Give yourself a compatible weapon
Try to attach the component
That's it! The system will automatically apply the correct component based on the weapon
Complete Example
Let's say you want to add a suppressor for a modded weapon called "WEAPON_MODDEDAK47":
Check existing items: Open
/inventoryand search for "suppressor" - it exists!Edit the item: Click edit on the suppressor item
Add the hash: Add
COMPONENT_MODDEDAK47_SUPPto the component hashes listSave
Test: Give yourself the suppressor and the modded AK47, then try attaching it
Last updated
Was this helpful?