For the complete documentation index, see llms.txt. This page is also available as Markdown.

Configurations

All Mosoto scripts are fully editable and customizable to match your server’s style, rules, and balance.


Breathalyzer
Config.Debug = false -- Enable/disable debug mode

Description: Controls debug information and detailed logging.

Options:

  • true: Enables debug mode with detailed console output

  • false: Disables debug mode (recommended for production)


Config.Breathalyzer = {
    authorizedJobs = {    -- Jobs with minimum grade allowed to use
        ["police"] = 0,   -- Police job with minimum grade 0
        ["ambulance"] = 0 -- Ambulance job with minimum grade 0
    }
}

Description: Controls which jobs can use the breathalyzer device.

Format: ["job_name"] = minimum_grade

  • job_name: The exact job name from your server

  • minimum_grade: Minimum job grade required (0 = all grades)


Config.Breathalyzer = {
    scale = 0.9,                  -- Scale of the breathalyzer device
    showCommand = "breathalyzer", -- Command to open breathalyzer
    itemName = "breathalyzer",    -- Name of the breathalyzer item
    enableItemUsage = true,       -- Enable/disable usage of the item
}

Scale:

Description: Controls the size of the breathalyzer device on screen

  • Range: 0.1 to 1.5

  • Default: 0.9 (90% of original size, recommended)

  • Use Cases: Adjust for different screen resolutions or preferences

Show Command:

Description: The command players can type to open the breathalyzer

  • Default: 'breathalyzer'

  • Usage: Players type /breathalyzer in chat

Item Name:

Description: The exact name of the breathalyzer item in your inventory

  • Must Match: The item name in your database/items configuration

  • Example: If your item is named 'breathalyzer_device', change this to match

Enable Item Usage:

Description: Controls whether the breathalyzer item can be used

  • Options: true (enabled), false (disabled)

  • Use Cases: Disable if you only want command-based access


Config.Breathalyzer = {
    clock = {
        useGameTime = false, -- true = in-game time, false = system time
        format24Hour = true  -- true = 24-hour format, false = 12-hour AM/PM
    }
}

Use Game Time:

Description: Controls which time system the breathalyzer displays

Options:

  • true: Shows in-game server time

  • false: Shows real system time

24-Hour Format:

Description: Controls time display format

Options:

  • true: 24-hour format (13:30, 23:45)

  • false: 12-hour format (1:30 PM, 11:45 PM)


Config.Breathalyzer = {
    controls = {
        blowKey = 38,  -- Key for blowing into breathalyzer
        closeKey = 177 -- Key for closing the UI
    }
}

Blow Key:

Description: The key players press to blow into the breathalyzer

  • Default: 38 (E key)

Close Key:

Description: The key to close the breathalyzer interface

  • Default: 177 (ESC key)

Key Code Reference: FiveM Controls Documentation (If you want to assign a different button, get its code from the link.)


Config.Breathalyzer = {
    pedDistance = 1.5 -- Distance to detect nearest player for paired test
}

Description: Controls how far the breathalyzer can detect other players for paired testing.

Range:

  • Lower Values: More precise, requires players to be very close (recommended)

  • Higher Values: More forgiving, can test players from further away

Alcohol
Config.AlcoholSystem = {
    effectsEnabled = true,
    drinkingAnimationEnabled = true
}

Config.AlcoholSettings = {
    -- BAC (Blood Alcohol Content) thresholds
    sober = { min = 0.00, max = 0.50 },    -- Sober range
    impaired = { min = 0.51, max = 1.00 }, -- Impaired range
    drunk = { min = 1.01, max = 4.0 },     -- Drunk range
}

Description: Defines the BAC ranges that determine a player's intoxication level.

Customization: You can adjust these ranges to match your server's gameplay style:

  • Sober Range: Light effects

  • Impaired Range: Medium effects

  • Drunk Range: Heavy effects



Config.AlcoholSettings = {
    reduceBAC = {
        amount = 0.008,        -- Amount BAC decreases per interval
        interval = 15,         -- Interval in seconds for BAC reduction
        -- Time calculation for 1.00 BAC:
        -- 1.00 ÷ 0.008 = 125 intervals
        -- 125 intervals × 15 seconds = 1875 seconds = 31.25 minutes
    }
}

Description: Controls how quickly players sober up over time.

Customization Options:

  • Amount: 0.001 to as much as you want (BAC reduction per interval)

  • Interval: 1 to as much as you want seconds (how often BAC decreases)

Example:

-- Default settings (0.008 every 15 seconds)
-- 1.00 BAC → 0.00 BAC = 31.25 minutes

-- Fast sobering (0.015 every 10 seconds)  
-- 1.00 BAC → 0.00 BAC = 11.1 minutes

-- Slow sobering (0.005 every 20 seconds)
-- 1.00 BAC → 0.00 BAC = 66.7 minutes

-- Very slow sobering (0.003 every 30 seconds)
-- 1.00 BAC → 0.00 BAC = 166.7 minutes (2.8 hours)

Config.AlcoholSettings = {
    hungerSensitivity = {
        enabled = true,                  -- Toggle hunger effect on BAC
        hungerSensitivityThreshold  = 30,-- Hunger percentage threshold
        hungerSensitivityMultiplier = 30 -- BAC increase percentage when hungry
    }
}
Config.AlcoholSettings = {
    hungerSensitivity = {
        enabled = true,                  -- Toggle hunger effect on BAC
        hungerSensitivityThreshold  = 30,-- Hunger percentage threshold
        hungerSensitivityMultiplier = 30 -- BAC increase percentage when hungry
    }
}

Description: Makes alcohol effects stronger when players are hungry.

Mechanics:

  • Threshold: When hunger drops below this percentage, effects amplify

  • Multiplier: BAC effects increase by this percentage when hungry

  • Example: At 30% hunger, 0.40 BAC becomes 0.52 BAC effect


effectRemovalItems = {
    ["yogurt"] = {
        time = 5000, -- Time in milliseconds to consume
        label = 'Yogurt', -- Display name for progress bar
        clearEffects = true, -- Remove drunk effects
        reduceBac = 0.30, -- Reduce BAC by amount (0.00 = no reduction)
        animation = {
            animDict = 'mp_player_intdrink',
            anim = 'loop_bottle'
        },
        prop = {
            model = 'prop_cs_script_bottle',
            bone = 60309,
            coords = vec3(0.0, 0.0, 0.03),
            rotation = vec3(0.0, 0.0, 0.0),
        },
    },
},

Config.AlcoholSettings = {
    ["whiskey"] = {
        bac = 0.40,         -- BAC increase when consumed
        time = 8000,        -- Time in milliseconds to consume
        thirstIncrease = 5, -- Increases thirst by 5%
        
        animation = {
            animDict = 'mp_player_intdrink', -- Animation dictionary
            anim = 'loop_bottle'             -- Animation name
        },
        
        prop = {
            model = 'prop_whiskey_bottle',  -- 3D model of the bottle
            bone = 60309,                   -- Bone ID to attach prop
            coords = vec3(0.0, 0.0, -0.18), -- Offset coordinates
            rotation = vec3(0.0, 0.0, -40)  -- Rotation in degrees
        }
    }
}

Key Properties:

  • BAC: How much alcohol content the item adds (0.01 to your max BAC)

  • Time: Consumption duration in milliseconds (1000 to 15000)

  • ThirstIncrease: Dehydration effect (0 to 20)

Animation & Props:

  • animDict: Animation library to use

  • anim: Animation name

  • model: 3D model name

  • bone: Body part to attach item to

  • coords: Position offset from bone

  • rotation: Item rotation in degrees

Add Your Item:

["item_name"] = {
    bac = 0.20,         -- Adjust BAC increase (0.01 to 4.0)
    time = 8000,        -- Adjust consumption time (1000 to 15000 ms)
    thirstIncrease = 5, -- Adjust thirst increase (0 to 20)
    
    animation = {
        animDict = 'mp_player_intdrink', -- Keep default or change
        anim = 'loop_bottle'             -- Keep default or change
    },
    
    prop = {
        model = 'prop_your_item_model', -- Change to your item model
        bone = 60309,                   -- Keep default (right hand)
        coords = vec3(0.0, 0.0, -0.18), -- Adjust position if needed
        rotation = vec3(0.0, 0.0, -40)  -- Adjust rotation if needed
    }
}
Drunk Levels
Config.DrunkLevels = {
    {
        minBac = 0.21,        -- Minimum BAC level for these effects
        maxBac = 0.49,        -- Maximum BAC level for these effects
        
        onFoot = {             -- Effects when player is on foot
            statusEffects = { ... },
            walkingDifficulty = { ... }
        },
        
        combat = {              -- Effects during combat
            damage = { ... },
            accidentalShooting = { ... }
        },
        
        driving = {             -- Effects while driving
            steeringDrift = { ... },
            randomVehicleEvents = { ... }
        }
    }
}

BAC Level Ranges:

  • Level 1 (0.21-0.49): Light effects, minor impairment

  • Level 2 (0.50-0.99): Moderate effects, noticeable impairment

  • Level 3 (1.00-1.49): Heavy effects, significant impairment

  • Level 4 (1.50-1.99): Severe effects, major impairment

  • Level 5 (2.00+): Extreme effects, dangerous impairment

Effect Categories:

  • OnFoot: Walking, movement, and status effects

  • Combat: Fighting, shooting, and damage effects

  • Driving: Vehicle control and random event effects


onFoot = {
    statusEffects = {
        ragdoll = { enabled = true, chance = 15 }, -- Random ragdoll falls
        blackout = { enabled = true, chance = 5 }, -- Temporary unconsciousness
        vomiting = { enabled = true, chance = 25, thirstIncrease = 10 }
    },
    
    walkingDifficulty = {
        enabled = true,      -- Enable walking effects
        swayIntensity = 0.8, -- Walking sway amount
        speedReduction = 0.3 -- Movement speed reduction
    }
}

Description: Controls how quickly players sober up over time.

Customization Options:

  • Amount: 0.001 to as much as you want (BAC reduction per interval)

  • Interval: 1 to as much as you want seconds (how often BAC decreases)

Example:

-- Default settings (0.008 every 15 seconds)
-- 1.00 BAC → 0.00 BAC = 31.25 minutes

-- Fast sobering (0.015 every 10 seconds)  
-- 1.00 BAC → 0.00 BAC = 11.1 minutes

-- Slow sobering (0.005 every 20 seconds)
-- 1.00 BAC → 0.00 BAC = 66.7 minutes

-- Very slow sobering (0.003 every 30 seconds)
-- 1.00 BAC → 0.00 BAC = 166.7 minutes (2.8 hours)

Config.AlcoholSettings = {
    hungerSensitivity = {
        enabled = true,                  -- Toggle hunger effect on BAC
        hungerSensitivityThreshold  = 30,-- Hunger percentage threshold
        hungerSensitivityMultiplier = 30 -- BAC increase percentage when hungry
    }
}

Description: Makes alcohol effects stronger when players are hungry.

Mechanics:

  • Threshold: When hunger drops below this percentage, effects amplify

  • Multiplier: BAC effects increase by this percentage when hungry

  • Example: At 30% hunger, 0.40 BAC becomes 0.52 BAC effect


Config.AlcoholSettings = {
    ["whiskey"] = {
        bac = 0.40,         -- BAC increase when consumed
        time = 8000,        -- Time in milliseconds to consume
        thirstIncrease = 5, -- Increases thirst by 5%
        
        animation = {
            animDict = 'mp_player_intdrink', -- Animation dictionary
            anim = 'loop_bottle'             -- Animation name
        },
        
        prop = {
            model = 'prop_whiskey_bottle',  -- 3D model of the bottle
            bone = 60309,                   -- Bone ID to attach prop
            coords = vec3(0.0, 0.0, -0.18), -- Offset coordinates
            rotation = vec3(0.0, 0.0, -40)  -- Rotation in degrees
        }
    }
}

Key Properties:

  • BAC: How much alcohol content the item adds (0.01 to your max BAC)

  • Time: Consumption duration in milliseconds (1000 to 15000)

  • ThirstIncrease: Dehydration effect (0 to 20)

Animation & Props:

  • animDict: Animation library to use

  • anim: Animation name

  • model: 3D model name

  • bone: Body part to attach item to

  • coords: Position offset from bone

  • rotation: Item rotation in degrees

Add Your Item:

["item_name"] = {
    bac = 0.20,         -- Adjust BAC increase (0.01 to 4.0)
    time = 8000,        -- Adjust consumption time (1000 to 15000 ms)
    thirstIncrease = 5, -- Adjust thirst increase (0 to 20)
    
    animation = {
        animDict = 'mp_player_intdrink', -- Keep default or change
        anim = 'loop_bottle'             -- Keep default or change
    },
    
    prop = {
        model = 'prop_your_item_model', -- Change to your item model
        bone = 60309,                   -- Keep default (right hand)
        coords = vec3(0.0, 0.0, -0.18), -- Adjust position if needed
        rotation = vec3(0.0, 0.0, -40)  -- Adjust rotation if needed
    }
}
Configurations
config.lua

Last updated