Info (metadata) entry for weapon attachments#
You can extract the weapon as a specialised weapon with the attachment method described here.
itemname = weapon_pistol
amount = 1
info.attachment = {
{['component'] = "flashlight"},
{['component'] = "suppressor"}
}
exports['bp_inventory']:AddItem(source, item, amount, info, slot)
- As you can see above, you can add automatic attacment to the weapon.
- You can find Components information in config.lua > Config.Weapons.