> For the complete documentation index, see [llms.txt](https://docs.alpha-scripts.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.alpha-scripts.net/documentation/information/library-settings.md).

# Library Settings

### 🎯 What is alpha-Lib?

This library serves as a core dependency script that ensures all of our products work seamlessly across different server setups.

### 🔑 Key Features

* **🔄 Automatic Framework Support**: Automatically detects ESX, QB-Core, QBX-Core, and ND\_Core
* **🎯 Automatic Resource Detection**: Automatically finds and configures resources on your server
* **🛠️ Common Functions**: Shared functions used by all Alpha Scripts
* **🔧 Compatibility Guarantee**: Ensures Alpha Scripts work regardless of your server setup
* **📊 Smart Bridge System**: Provides compatibility between different frameworks

### 🚀 Installation

#### 1. Script Installation

```bash
# Extract the alpha-Lib to your resources directory
resources/alpha-Lib
```

#### 2. server.cfg Configuration

{% hint style="warning" %}
**IMPORTANT**: Start alpha-Lib **BEFORE** all Alpha Scripts:
{% endhint %}

```bash
# Start Alpha-Lib first
ensure alpha-Lib

# Then start other Alpha Scripts
ensure alpha-OilDrum
ensure alpha-NailBox
# ... other Alpha Scripts
```

### ⚙️ Configuration

{% hint style="info" %}
**Config Editor** — You can configure Alpha Scripts visually without touching any files. Visit [config editor](https://store.alpha-scripts.net/config-editor), upload your config file(s), and edit your settings through the web interface.
{% endhint %}

#### Complete Configuration

Most settings use **auto-detection**. Manual configuration is only recommended when necessary.

{% code fullWidth="false" %}

```lua
Config = {
    ---@type "auto-detect" | "qb-core" | "es_extended" | "qbx_core" | "ND_Core"
    Framework = "auto-detect",

    ---@type "auto-detect" | "qb-inventory" | "ox_inventory" | "esx_addoninventory" | "tgiann-inventory"
    Inventory = "auto-detect",

    ---@type string | false
    ---@description If set to a string, it will use the item as money, otherwise it will use the default money system
    MoneyAsItem = false,

    ---@type "auto-detect" | "qb-target" | "ox_target"
    Target = "auto-detect",

    ---@type "auto-detect" | "qb-core" | "es_extended" | "qbx_core" | "ND_Core" | "ox_lib" | "okokNotify"
    Notification = "auto-detect",

    ---@type "left" | "right" | "top" | "bottom" | "top-right" | "top-left" | "bottom-right" | "bottom-left" | "center-right" | "center-left"
    NotificationPosition = "left",

    ---@type boolean
    ---@description If true, it will play a sound when a notification is displayed
    NotificationPlaySound = false,

    ---@type "auto-detect" | "qb-core" | "esx_textui" | "ox_lib" | "okokTextUI"
    TextUI = "auto-detect",

    ---@type "left" | "right" | "top" | "bottom" | "right-center" | "left-center" | "top-center" | "bottom-center"
    TextUIPosition = "left",

    ---@type boolean
    ---@description If true, it will play a sound when a Text UI is displayed
    TextUIPlaySound = false,

    ---@type "auto-detect" | "qb-core" | "ox_lib"
    ProgressBar = "auto-detect",

    ---@type "auto-detect" | "qb-core" | "es_extended" | "ox_lib"
    Callback = "auto-detect",

    ---@type "auto-detect" | "oxmysql" | "ghmattimysql"
    Database = "auto-detect",

    ---@type "auto-detect" | "qb-policejob" | "cd_dispatch3d"
    PoliceAlert = "auto-detect",

    ---@type boolean
    ---@description If true, it will make the police alert blip flash on the map
    PoliceAlertFlashes = false,

    ---@type boolean
    ---@description If true, it will play a sound when a police alert is sent
    PoliceAlertSound = true,

    ---@type "auto-detect" | "qb-vehiclekeys" | "qs-vehiclekeys" | "qbx_vehiclekeys" | "ND_VehicleSystem"
    VehicleKeys = "auto-detect",
}
```

{% endcode %}

#### Configuration Options Explained

<table data-full-width="false"><thead><tr><th>Setting</th><th>Description</th><th>Available Options</th></tr></thead><tbody><tr><td><code>Framework</code></td><td>Detects your server's main framework</td><td><code>"auto-detect"</code>, <code>"es_extended"</code>, <code>"qb-core"</code>, <code>"qbx_core"</code>, <code>"ND_Core"</code></td></tr><tr><td><code>Inventory</code></td><td>Detects your inventory system</td><td><code>"auto-detect"</code>, <code>"ox_inventory"</code>, <code>"qb-inventory"</code>, <code>"esx_addoninventory"</code>, <code>"tgiann-inventory"</code><br></td></tr><tr><td><code>MoneyAsItem</code></td><td>Use an item as money instead of cash</td><td><code>false</code> or item name like <code>"cash"</code></td></tr><tr><td><code>Target</code></td><td>Detects your targeting system</td><td><code>"auto-detect"</code>, <code>"ox_target"</code>, <code>"qb-target"</code></td></tr><tr><td><code>Notification</code></td><td>Detects your notification system</td><td><code>"auto-detect"</code>, <code>"ox_lib"</code>, <code>"okokNotify"</code>, framework default</td></tr><tr><td><code>NotificationPosition</code></td><td>Position of notifications on screen</td><td><code>"left"</code>, <code>"right"</code>, <code>"top"</code>, <code>"bottom"</code>, <code>"top-right"</code>, <code>"top-left"</code>, <code>"bottom-right"</code>, <code>"bottom-left"</code>, <code>"center-right"</code>, <code>"center-left"</code></td></tr><tr><td><code>NotificationPlaySound</code></td><td>Play sound with notifications</td><td><code>true</code> or <code>false</code></td></tr><tr><td><code>TextUI</code></td><td>Detects your text UI system</td><td><code>"auto-detect"</code>, <code>"ox_lib"</code>, <code>"okokTextUI"</code>, <code>"esx_textui"</code>, framework default</td></tr><tr><td><code>TextUIPosition</code></td><td>Position of text UI on screen</td><td><code>"left"</code>, <code>"right"</code>, <code>"top"</code>, <code>"bottom"</code>, <code>"right-center"</code>, <code>"left-center"</code>, <code>"top-center"</code>, <code>"bottom-center"</code></td></tr><tr><td><code>TextUIPlaySound</code></td><td>Play sound with text UI</td><td><code>true</code> or <code>false</code></td></tr><tr><td><code>ProgressBar</code></td><td>Detects your progress bar system</td><td><code>"auto-detect"</code>, <code>"ox_lib"</code>, framework default</td></tr><tr><td><code>Callback</code></td><td>Detects your callback system</td><td><code>"auto-detect"</code>, <code>"ox_lib"</code>, framework default</td></tr><tr><td><code>Database</code></td><td>Detects your database system</td><td><code>"auto-detect"</code>, <code>"oxmysql"</code>, <code>"ghmattimysql"</code></td></tr><tr><td><code>PoliceAlert</code></td><td>Detects your police alert system</td><td><code>"auto-detect"</code>, <code>"qb-policejob"</code>, <code>"cd_dispatch3d"</code></td></tr><tr><td><code>PoliceAlertFlashes</code></td><td>Make police alert blip flash on map</td><td><code>true</code> or <code>false</code></td></tr><tr><td><code>PoliceAlertSound</code></td><td>Play sound when police alert is sent</td><td><code>true</code> or <code>false</code></td></tr><tr><td><code>VehicleKeys</code></td><td>Detects your vehicle keys system</td><td><code>"auto-detect"</code>, <code>"qb-vehiclekeys"</code>, <code>"qs-vehiclekeys"</code>, <code>"qbx_vehiclekeys"</code>, <code>"ND_VehicleSystem"</code></td></tr></tbody></table>

#### When to Change Settings

**Most users should leave everything as `"auto-detect"`** - the library will find your resources automatically.

Only change settings if:

* Auto-detection fails to find your resources
* You want to force a specific resource to be used
* You're using custom/renamed resources

#### UI Positioning Settings

**Notification Positions**

* `"left"` - Left side of screen
* `"right"` - Right side of screen
* `"top"` - Top of screen
* `"bottom"` - Bottom of screen
* `"top-right"` - Top right corner (QBX only)
* `"top-left"` - Top left corner (QBX only)
* `"bottom-right"` - Bottom right corner (QBX only)
* `"bottom-left"` - Bottom left corner (QBX only)
* `"center-right"` - Center right (QBX only)
* `"center-left"` - Center left (QBX only)

**Text UI Positions**

* `"left"` - Left side of screen
* `"right"` - Right side of screen
* `"top"` - Top of screen
* `"bottom"` - Bottom of screen
* `"right-center"` - Right center (ox\_lib only)
* `"left-center"` - Left center (ox\_lib only)
* `"top-center"` - Top center (ox\_lib only)
* `"bottom-center"` - Bottom center (ox\_lib only)

#### Advanced Settings

**Money System Customization**

```lua
-- Default money system
MoneyAsItem = false

-- Use item as money (e.g., "cash" item)
MoneyAsItem = "cash"
```

**Sound Settings**

```lua
-- Sound settings
NotificationPlaySound = false  -- Play sound with notifications
TextUIPlaySound = false        -- Play sound with text UI
```

### 📋 Supported Resources

#### **🏗️ Frameworks**

* **ESX (es\_extended)** - Full support
* **QB-Core (qb-core)** - Full support
* **QBX-Core (qbx\_core)** - Full support
* **ND Core (ND\_Core)** - Full support

#### **🎒 Inventory Systems**

* **ox\_inventory** - Recommended
* **qb-inventory** - QB-Core default
* **esx\_addoninventory** - ESX default
* **tgiann-inventory**

#### **🎯 Target Systems**

* **ox\_target** - Recommended
* **qb-target** - QB-Core default

#### **🔔 Notification Systems**

* **ox\_lib** - Modern UI
* **okokNotify** - Popular choice
* **Framework defaults**

#### **📱 Text UI Systems**

* **ox\_lib** - Modern, customizable
* **okokTextUI** - Popular choice with animations
* **esx\_textui** - Classic ESX style
* **Framework built-in** - Uses framework's default

#### **⏳ Progress Bar Systems**

* **ox\_lib** - Modern with animations
* **Framework built-in** - Uses framework's default

#### **🔗 Callback Systems**

* **ox\_lib** - Modern callback system
* **Framework built-in** - Uses framework's default

#### **🗄️ Database Systems**

* **oxmysql** - Recommended
* **ghmattimysql** - Legacy support

#### **🚔 Police Alert Systems**

* **qb-policejob** - QB-Core police system
* **cd\_dispatch3d**

#### **🔑 Vehicle Keys Systems**

* **qb-vehiclekeys** - QB-Core vehicle keys
* **qs-vehiclekeys** - Quasar vehicle keys
* **qbx\_vehiclekeys** - QBX-Core vehicle keys
* **ND\_VehicleSystem** - ND Core vehicle system

{% hint style="success" %}
**NOTE:** If you want to add support for a new script or resource, please contact us through our [Discord server](https://discord.gg/F9jxW5F7fp) by opening a [ticket](https://discord.com/channels/1319681868928647248/1324375771674050640). We'll be happy to help integrate new resources into Alpha-Lib.
{% endhint %}

### 📞 Support

#### 🎮 Discord Server

{% embed url="<https://discord.gg/F9jxW5F7fp>" %}

#### 📝 When asking for help, please provide:

1. **Your framework** (ESX, QB-Core, QBX-Core, ND\_Core)
2. **Console errors** (copy the full error message)
3. **Your server setup** (what inventory, target system, etc. you use)
4. **What Alpha Script** you're having issues with

#### ✅ Before asking for support:

* Make sure alpha-Lib starts before all Alpha Scripts in server.cfg
* Check that all your resources are started and working
* Try restarting your server
* Check if the issue happens with only alpha-Lib (no other scripts)
