gearConfigurations

⚙️ Configurations

The config.lua file allows you to customize every aspect of the Space Addictions system. Below is a detailed breakdown of each section, followed by the full configuration file for reference.


🧩 Configuration Breakdown

🖥️ Framework Setup

Description: Sets the framework your server is running on. This is essential for the script to work correctly.

  • Type: string

  • Valid Options: 'qbcore', 'qbox', 'esx'

-- Choose your framework
Config.Framework = 'qbox' -- Options: 'qbcore', 'qbox', 'esx'

</details>


⚙️ General Settings

<details> <summary><code>Config.DrugImmunity</code></summary>

Description: Defines the maximum toxicity a player can accumulate. Reaching this value triggers an overdose.

  • Type: number

  • Default: 100

</details> <details> <summary><code>Config.EnablePuritySystem</code></summary>

Description: If true, the script uses the purity metadata (1–100) on drug items. This value multiplies the drug’s toxicity and addiction chance.

  • Type: boolean

  • Default: true

</details>


💊 Usable Drugs

Config.UsableDrugs is the table defining all consumable drugs and their effects. Each drug includes:

Key
Type
Description

label

string

Display name on the addiction HUD

animation

string

Animation to play on use (smoke, syringe, sniff, pill)

drugStrength

number

Base toxicity added by the drug

healthEffects

table

Effects on health and armor ({ armour = 10, health = -10 })

addiction

table

Addiction settings (see below)

effect

table

Visual and gameplay effects (see below)

Addiction Table

Key
Type
Description

chance

number

% chance (0–100) of addiction per use

time

number

Minutes before withdrawal effects start

withdrawal_effects

table

List of possible withdrawal effects

Effect Table

Key
Type
Description

duration

number

Effect duration in seconds

screenFX

string

FiveM screen effect name

speedMultiplier

number

Player speed multiplier (e.g., 1.2 = 20% faster)

walkingStyle

string

Walking animation set

cameraShakeIntensity

number

Intensity of camera shake

Example:


💉 Medications & Remedies

<details> <summary><code>Config.Medication</code></summary>

Description: Defines items that cure addiction.

</details> <details> <summary><code>Config.Remedies</code></summary>

Description: Defines items that recover immunity (reduce toxicity) without curing addiction.

</details>


🌐 Translations

<details> <summary><code>Config.Translations</code></summary>

Description: All UI text strings, allowing easy translation.

</details>


📄 Full config.lua File

Last updated