Config file

The weaponAttachment config originally included all weapons.

--[[ 
    - this script needs tgiann-core script to work, you can download the script from your keymaster account
      Start tgiann-core script after es_extented/qb-core script and before tgiann-* scripts
      Adjust the tgiann-core config file according to the framework you are using


    Event List
        Client
            tgiann-attachment:openUI | Open UIua
]]

config = exports["tgiann-core"]:getConfig()

config.langs = {
    ["tgiann_huds_damage"] = "Damage",
    ["tgiann_huds_speed"] = "Speed",
    ["tgiann_huds_capacity"] = "Capacity",
    ["tgiann_huds_accuracy"] = "Accuracy",
    ["tgiann_huds_range"] = "Range",
    ["tgiann_huds_lightLaser"] = "Flashlight/Laser",
    ["tgiann_huds_tint"] = "Tint",
    ["tgiann_huds_color"] = "Color",
    ["tgiann_huds_magazine"] = "Magazine",
    ["tgiann_huds_grip"] = "Grip",
    ["tgiann_huds_stock"] = "Stock",
    ["tgiann_huds_scope"] = "Scope",
    ["tgiann_huds_barrel"] = "Barrel",
    ["tgiann_huds_muzzle"] = "Mızzle/Suppressor",
    ["apply"] = "Apply",
    ["preview"] = "Preview",
    ["free"] = "Free",
    ["default"] = "Default",
    ["lang_weaponAttachments"] = "Weapon Attachments",
    ["noMoney"] = "You Don't Have Money",
    ["noItem"] = "You Don't have the requirement item",
    ["alreadyGotWeaponBuy"] = "Already Have This Attachment On Your Weapon",
    ["purchased"] = "Purchased Attachment",
    ["alreadyGotWeaponPreview"] = "You Are Already Previewing This Attachment In Your Weapon"
}

config.moneyType = "bank"
config.enableCommand = true
config.commandName = "open"
config.tableSpawnZ = 200

config.locations = {
    active = true,
    locations = {
        {
            ped = `ig_lamardavis`,
            coords = vector4(16.734068, -1110.553833, 29.785400, 249.448822),
            maxDistance = 3,
            pressDistance = 2,
            text = "Weapon Attachments"
        },
    }
}

--[[ 
    item: Component Money or Item Name | string or int
        Example
            item = 500
            item = "free"
            item = "flashlight"

    component: Component Name | string
        Example
            component = "COMPONENT_SWITCHBLADE_VARMOD_BASE"

    default: is component default compent | bool
        Example
            default = true
            default = false
]]
weaponAttachment = {
    -- Malee
    ["weapon_switchblade"] = {
        ["tint"] = {
            {item = "free", component = "COMPONENT_SWITCHBLADE_VARMOD_BASE", default = true},
            {item = "free", component = "COMPONENT_SWITCHBLADE_VARMOD_VAR1"},
            {item = "free", component = "COMPONENT_SWITCHBLADE_VARMOD_VAR2"},
        }
    },
    ["weapon_knuckle"] = {
        ["tint"] = {
            {item = "free", component = "COMPONENT_KNUCKLE_VARMOD_BASE", default = true},
            {item = "free", component = "COMPONENT_KNUCKLE_VARMOD_PIMP"},
            {item = "free", component = "COMPONENT_KNUCKLE_VARMOD_BALLAS"},
            {item = "free", component = "COMPONENT_KNUCKLE_VARMOD_DOLLAR"},
            {item = "free", component = "COMPONENT_KNUCKLE_VARMOD_DIAMOND"},
            {item = "free", component = "COMPONENT_KNUCKLE_VARMOD_HATE"},
            {item = "free", component = "COMPONENT_KNUCKLE_VARMOD_LOVE"},
            {item = "free", component = "COMPONENT_KNUCKLE_VARMOD_PLAYER"},
            {item = "free", component = "COMPONENT_KNUCKLE_VARMOD_KING"},
            {item = "free", component = "COMPONENT_KNUCKLE_VARMOD_VAGOS"},
        }
    },
    --weapon_pistol
    ["weapon_pistol"] = {
        ["magazine"] = {
            {item = "free", component = "COMPONENT_PISTOL_CLIP_01", default = true},
            {item = 500, component = "COMPONENT_PISTOL_CLIP_02"},
        },
        ["flashlight"] = {
            {item = "bandage", component = "COMPONENT_AT_PI_FLSH"},
        },
        ["muzzle"] = {
            {item = "muzzle1", component = "COMPONENT_AT_PI_SUPP_02"},
        },
        ["tint"] = {
            {item = "free", component = "COMPONENT_PISTOL_VARMOD_LUXE"},
        }
    },
    ["weapon_combatpistol"] = {
        ["magazine"] = {
            {item = "free", component = "COMPONENT_COMBATPISTOL_CLIP_01", default = true},
            {item = "free", component = "COMPONENT_COMBATPISTOL_CLIP_02"},
        },
        ["flashlight"] = {
            {item = "free", component = "COMPONENT_AT_PI_FLSH"},
        },
        ["muzzle"] = {
            {item = "free", component = "COMPONENT_AT_PI_SUPP"},
        },
        ["tint"] = {
            {item = "free", component = "COMPONENT_COMBATPISTOL_VARMOD_LOWRIDER"},
        }
    },
    ["weapon_appistol"] = {
        ["magazine"] = {
            {item = "free", component = "COMPONENT_APPISTOL_CLIP_01", default = true},
            {item = "free", component = "COMPONENT_APPISTOL_CLIP_02"},
        },
        ["flashlight"] = {
            {item = "free", component = "COMPONENT_AT_PI_FLSH"},
        },
        ["muzzle"] = {
            {item = "free", component = "COMPONENT_AT_PI_SUPP"},
        },
        ["tint"] = {
            {item = "free", component = "COMPONENT_APPISTOL_VARMOD_LUXE"},
        }
    },
    ["weapon_pistol50"] = {
        ["magazine"] = {
            {item = "free", component = "COMPONENT_PISTOL50_CLIP_01", default = true},
            {item = "free", component = "COMPONENT_PISTOL50_CLIP_02"},
        },
        ["flashlight"] = {
            {item = "free", component = "COMPONENT_AT_PI_FLSH"},
        },
        ["muzzle"] = {
            {item = "free", component = "COMPONENT_AT_AR_SUPP_02"},
        },
        ["tint"] = {
            {item = "free", component = "COMPONENT_PISTOL50_VARMOD_LUXE"},
        }
    },
    ["weapon_revolver"] = {
        ["tint"] = {
            {item = "free", component = "COMPONENT_REVOLVER_VARMOD_BOSS"},
            {item = "free", component = "COMPONENT_REVOLVER_VARMOD_GOON"},
        }
    },
    ["weapon_snspistol"] = {
        ["magazine"] = {
            {item = "free", component = "COMPONENT_SNSPISTOL_CLIP_01"},
            {item = "free", component = "COMPONENT_SNSPISTOL_CLIP_02"},
        },
        ["tint"] = {
            {item = "free", component = "COMPONENT_SNSPISTOL_VARMOD_LOWRIDER"},
        }
    },
    ["weapon_heavypistol"] = {
        ["magazine"] = {
            {item = "free", component = "COMPONENT_HEAVYPISTOL_CLIP_01", default = true},
            {item = "free", component = "COMPONENT_HEAVYPISTOL_CLIP_02"},
        },
        ["flashlight"] = {
            {item = "free", component = "COMPONENT_AT_PI_FLSH"},
        },
        ["muzzle"] = {
            {item = "free", component = "COMPONENT_AT_PI_SUPP"},
        },
        ["tint"] = {
            {item = "free", component = "COMPONENT_HEAVYPISTOL_VARMOD_LUXE"},
        }
    },
}

Last updated