GFX Development
  • gfx
    • About GFX
  • Product Docs
    • 📥GFX All in One Menu
      • 🛠️Setup
        • ⚙️Configuration
        • 📝Setting Permissions
      • 📒Informations
        • 💻For Developers
        • 👨‍💻Admin Commands
      • 🖇️Pages
        • 📄Profile
        • 📄Leaderboard
    • 🏎️GFX Racing
      • 🔨Installation
      • ⚙️Configuration
    • 📸GFX Deathcam
      • 🔨Installation
      • GFX Deathcam V1
        • ⚙️Configuration
      • GFX Deathcam V2
        • ⚙️Configuration
    • 📊GFX Leaderboard
      • 🔨Installation
      • ⚙️Configuration
    • ⚔️GFX Arena
      • 🔨Installation
      • ⚙️Configuration
    • 👨‍👨‍👦‍👦GFX Squad
      • 🔨Installation
      • ⚙️Configuration
      • 💻Exports
    • 🔬GFX Evidence
      • 🔨Installation
      • ⚙️Configuration
    • ❗GFX Notification
      • 🔨Installation
      • ⚙️Configuration
      • 💻Exports and Events
        • ⬆️Exports
        • ⬇️Events
    • 🚚GFX Delivery
      • 🔨Installation
      • ⚙️Configuration
    • 🛍️GFX Tebexshop
      • 🔨Installation
      • ⚙️Configuration
      • ⚠️Tebex Settings
      • ⬆️Exports
    • 👁️‍🗨️GFX Interact
      • 🔨Installation
      • ⬆️Exports
    • 🫂GFX Crew
      • 🔨Installation
      • ⚙️Configuration
      • ⬆️Exports
    • 🫂GFX Squad Remake
      • 🔨Installation
      • ⚙️Configuration
      • ⬆️Exports
    • GFX PVP Chat
      • 🔨Installation
      • ⚙️Configuration
      • ⬆️Exports
    • GFX HUD
      • 🔨Installation
      • ⚙️Configuration
    • 🔫GFX Attachment
      • 🔨Installation
      • ⚙️Configuration
    • 💀GFX Deathlog
      • 🔨Installation
      • ⚙️Configuration
    • 🛍️GFX PVP Shop
      • 🔨Installation
      • ⚙️Configuration
    • 🧱GFX Crafting
      • 🔨Installation
      • ⚙️Configuration
    • 🚍GFX Bus Job
      • 🔨Installation
      • ⚙️Configuration
    • 🐔GFX Chicken Farm
      • 🔨Installation
      • ⚙️Configuration
    • 🎁GFX Giveaway
      • 🔨Installation
      • ⚙️Configuration
    • 🛍️GFX Pawnshop
      • 🔨Installation
      • ⚙️Configuration
    • 🪵GFX Lumberjack
      • 🔨Installation
      • ⚙️Configuration
    • 🚙GFX Secondhand Vehicle
      • 🔨Installation
      • ⚙️Configuration
    • 🤖GFX Autopilot
      • 🔨Installation
      • ⚙️Configuration
    • 🗳️GFX Vote
      • 🔨Installation
      • ⚙️Configuration
    • 🟢GFX Safezone
      • 🔨Installation
      • ⚙️Configuration
    • 🎅GFX Christmastruck
      • 🔨Installation
      • ⚙️Configuration
    • 🚔GFX Handcuff
      • 🔨Installation
      • ⚙️Configuration
    • 🚚GFX Trucker Job
      • 🔨Installation
      • ⚙️Configuration
    • 🌱GFX Weed
      • 🔨Installation
      • ⚙️Configuration
    • 🔉GFX DUI Radio
      • 🔨Installation
      • ⚙️Configuration
Powered by GitBook
On this page
  1. Product Docs
  2. GFX Attachment

Configuration

Check the instructions below.

The script offers two main configuration files: Config.lua and server_config.lua.


Config.lua

The Config.lua file defines the settings for benches, items, and attachments. Below is a breakdown of the options:

General Settings

Setting
Description
Default Value

locale

Language for the script.

"en"


Bench Configuration

Benches can be configured using the following options:

Setting
Description

type

Specifies the type of bench (prop, coords).

model

Model of the bench (for props).

coords

Position of the bench (for coordinate-based benches).

Example Bench Configuration:

luaCopy codeBenchs = {
    {
        type = "prop",
        model = "gr_prop_gr_bench_04a",
    },
    {
        type = "coords",
        coords = vector3(-2131.84, 3267.4, 32.81),
    },
    {
        type = "createProp",
        model = "gr_prop_gr_bench_04b",
        coords = vector4(-2136.1301, 3257.9106, 31.8103, -30.2677),
    }
}

Item Configuration

Items and their attachments can be customized as follows:

Setting
Description

label

Name of the weapon or attachment.

image

Image file for the item (in html/images/).

Attachments

List of attachments for the weapon.

Example Weapon Configuration:

luaCopy codeItems = {
    ["weapon_assaultrifle"] = {
        label = "Assault Rifle",
        image = "assault_rifle.png",
        Attachments = {
            ["default_clip"] = {
                component = "COMPONENT_ASSAULTRIFLE_CLIP_01",
                label = "Default Clip",
                item = "default_clip",
                image = "default_clip.png",
                description = "Standard issue clip for the assault rifle.",
            },
            ["scope"] = {
                component = "COMPONENT_AT_SCOPE_MACRO",
                label = "Scope",
                item = "scope",
                image = "scope.png",
                description = "Scope for enhanced targeting accuracy.",
            },
        }
    }
}

Attachment Tags

Attachment-specific properties include:

Property
Description

damageTag

Affects weapon damage (true/false).

accuracyTag

Affects weapon accuracy (true/false).

key

Key for the attachment category.


server_config.lua

The server_config.lua file manages server-side configurations such as Discord integration.

Setting
Description
Default Value

PhotoType

Source of player photos (steam).

"steam"

NoImage

URL for placeholder image.

"https://cdn.discordapp...

DiscordBotToken

Token for Discord bot integration (replace with yours).

"YOUR_DISCORD_BOT_TOKEN"

Example Configuration:

luaCopy codeConfig.PhotoType = "steam"
Config.NoImage = "https://cdn.discordapp.com/attachments/736562375062192199/995301291976831026/noimage.png"
Config.DiscordBotToken = "YOUR_DISCORD_BOT_TOKEN"

Usage

Weapon Attachments

  • Attach Components: Attach specific components such as scopes, grips, and suppressors by interacting with configured benches.

Notifications

Notifications can be displayed to the player for various attachment actions.

Example Notification Trigger:

luaCopy codeTriggerEvent("gfx_attachment:notify", "Attachment added!", "success", 5000)
  • Message: Notification message.

  • Type: Notification type (success, error).

  • Duration: Time in milliseconds.


PreviousInstallationNextGFX Deathlog

Last updated 5 months ago

🔫
⚙️