Configuration

This page contains all information you need to configure gfg_drugeffects, if you have any questions feel free to reach out to us on our discord.

Config

Config = {
    language = "en",
    debug = false,
    inventory = "ox_inventory",
    useMinutes = true
}

Language

Language sets which Locale to use, you can find available locales in [gfg_drugeffects/locale/], we will add more as they become available but feel free to add your own.

Language = "en",

Debug

Debug should only used in a development environment

Determines whether to send debug print statements to the client and server when using the script

Debug = false

inventory

Determines wich inventory resource to use.

Currently supported options are:

  • "ox_inventory"

  • "qb_inventory"

inventory = "ox_inventory",

useMinutes

Determines whether to use minutes or milliseconds for the effect duration.

useMinutes = true

Config.DrugEffects

Config.DrugEffects = {    
    joint = {
        itemName = "joint",
        useTime = 2500,
        name = "joint",
        effect = "CrossLine",
        duration = 10,
        drunk = false,
        blur = true,
        sprintMulitplier = 1.0,
        walkingAnimation = "move_m@depressed@a",
        timecycle = {
            name = 'LostTimeFlash',
            strength = 1.0,
        },
        transition = {
            {
                enable = true,
                type = "out",
                effect = "CrossLineOut",
                duration = 10000
            }
        },
        requiredItems = {
            {
                itemName = "lighter",
                count = 1
        },
    },
},

itemName

The name of the item in your inventory script.

itemName = "joint",

useTime

Determines how long after the item is used to start the effect.

useTime = 2500,

name

Arbitrary name of the effect (Only used for debugging).

name = "joint",

effect

needs to be "looped" (Runs until the set time is over)

Determines wich effect to use.

effect = "CrossLine",

duration

if Config.useMinutes is true then this is in minutes, otherwise it is milliseconds

Determines how long to play the effect for.

duration = 10,

drunk

If 'true' sets the player to drunk. (no effects specifically linked to this value)

drunk = false,

blur

If 'true' enables motion blur for duration of the effect.

blur = true,

sprintMultiplier

this value can't be over 1.49

Determines the players sprint multiplier (1.0 being normal)

sprintMulitplier = 1.0,

walkingAnimation

Determines the Movement Clipset (set to 'none' if you want to use the default)

walkingAnimation = "move_m@depressed@a",

timecycle

Determines the timecycle to play for the duration of the effect.

  • name = Determines which timecycle to use (set to 'none' if you want to ignore this).

  • strength = Determines the strength of the timcycle

    timecycle = {
        name = 'LostTimeFlash',
        strength = 1.0,
    },

transition

The effect for transition needs to be 'non-looped' for the cleanest look

The transition played before and after the effect.

  • enable = If 'true' will use this transition.

  • type = Determines the type of animation ('in' plays before the main effect, 'out' plays after the main effect.)

  • effect = Determines wich effect to use.

  • duration = Determines the duration of the transition effect. (in milliseconds)

    transition = {
        {
            enable = true,
            type = "out",
            effect = "CrossLineOut",
            duration = 10000
        }
    },

requiredItems

You can have multiple required items.

Items needed in order to use the item and play the effect.

  • itemName = The name of the item in your inventory script.

  • count = The amount of the item needed.

    requiredItems = {
        {
            itemName = "lighter",
            count = 1
        },
    },

Last updated