> For the complete documentation index, see [llms.txt](https://thug.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thug.gitbook.io/documentation/scripts/roleplay-scripts/thug-coke-snorting/shared-config.lua.md).

# shared/config.lua

```lua
-- | # For the most quality and unique FiveM resources: https://thug-studios.com
-- | # If you need help, join our Discord server: https://discord.gg/thugstudios

Config = {}

-- | # Settings ------------------------------------------------------------------
-- | # 'ox' = ox_inventory (default), 'other' = custom inventory (edit server/no_escrow.lua).

Config.Settings = {
    Inventory  = 'ox',          -- | # 'ox' = ox_inventory, 'other' = custom inventory.
    Target     = 'ox',          -- | # 'ox' = ox_target, 'qb' = qb-target.
    Plate_Item = 'coke_plate',  -- | # Inventory item name for the plate.
}

-- | # Distances ----------------------------------------------------------------

Config.Distances = {
    Pass        = 3.0,   -- | # Maximum distance to pass the plate to another player (meters).
    Place       = 10.0,  -- | # Maximum raycast distance for placing the plate / pile (meters).
    Interaction = 5.0,   -- | # Maximum distance the owner can be from a session to interact (meters).
}

-- | # Overdose -----------------------------------------------------------------
-- | # Tracks lines snorted within Time_Window. Going over Max_Lines triggers an overdose.

Config.Overdose = {
    Enabled     = true,   -- | # Master switch for overdose system.
    Max_Lines   = 20,     -- | # Lines allowed within the time window before overdose.
    Time_Window = 10,     -- | # Time window in minutes for the line counter.
    Duration    = 10000,  -- | # How long the player stays on the ground (ms).
}

-- | # Effects (Intoxication) ---------------------------------------------------

Config.Effects = {
    Max_Stacks      = 20,    -- | # Maximum intoxication stacks a player can accumulate.
    Decay_Start     = 29000, -- | # How long stacks are held after the last snort before decay starts (ms).
    Decay_Per_Stack = 1600,  -- | # How often 1 intoxication stack decays once the timer starts (ms).
}

-- | # Euphoria -----------------------------------------------------------------
-- | # Triggered per snort when the active level entry has Euphoria = true.
-- | # Plays the FocusIn screen effect. The first euphoria-line starts the timer
-- | # at Duration seconds. Each subsequent euphoria-line snorted while still
-- | # active extends remaining time by Extend seconds, capped at Max_Duration.

Config.Euphoria = {
    Duration     = 30,    -- | # Seconds the screen effect plays on the first euphoria-line.
    Extend       = 30,    -- | # Seconds added per subsequent euphoria-line snorted while active.
    Max_Duration = 160,   -- | # Hard cap on remaining time at any moment (seconds).
}

-- | # Requirements -------------------------------------------------------------
-- | # Optional item gates (item is only checked, not consumed).
-- | # If Enabled and player doesn't have the Item, the action is blocked + notified.

Config.Requirements = {
    Snort = {
        Enabled        = false,                              -- | # Require any of the items to snort a line.
        Accepted_Items = { 'money', 'rolled_money' },        -- | # Any one of these items is enough.
    },
    Spread = {
        Enabled        = false,                              -- | # Require any of the items to spread the pile.
        Accepted_Items = { 'credit_card', 'driver_license' },-- | # Any one of these items is enough.
    },
}

-- | # Cocaine Types ------------------------------------------------------------
-- | Each cocaine entry defines its own item, label, and per-use line count.
-- | You can add or remove entries freely.
-- |
-- | Item          = Item name in your inventory.
-- | Label         = Display name shown in notifications.
-- | Lines_Per_Use = How many lines one use produces (clamped 1-13).

Config.Cokes = {
    coke_1g = {
        Item          = 'coke_1g',
        Label         = 'Cocaine (1g)',
        Lines_Per_Use = 13,
    },
}

```
