🛠️Installation

Step1: Adding the resource to your server

ensure qb-core
ensure progressbar
ensure cr-effects

Step 2: Editing the config

Below is an example of an item with effects.

Config.Items = {
    ["example"] = {
        name = "phone", -- The name of the useable item
        useItemText = "Smoke weed", -- What to notify when you use the item
        effect = {
            speed = { -- Run faster
                enabled = false,
                time = 30,
            },
            drunk = { -- Get a Drunk effect
                enabled = false,
                time = 30,
            },
            alienEffect = {
                enabled = false,
                time = 30,
            },
            relieveStress = { -- Reduce stress
                enabled = false,
                amount = 100
            },
            healthRegen = { -- Gain health regeneration
                enabled = false,
                time = 30,
                rate = 1.8
            },
            ragDoll = { -- Sets the player to ragdoll 
                enabled = false,
                time = 30
            },
            stumble = { -- Stumble while running
                enabled = false,
                time = 30
            },
            reliveThirst = {
                enabled = false,
                amount = 10
            },
            reliveHunger = {
                enabled = false,
                amount = 10
            },
            stamina = { -- Get more stamina so you can run longer
                enabled = false,
                time = 30
            },
            CameraShake = {
                enabled = false,
                time = 30, -- for how long
                CameraShakeType = "SMALL_EXPLOSION_SHAKE", -- What type of shake (DEATH_FAIL_IN_EFFECT_SHAKE, DRUNK_SHAKE, FAMILY5_DRUG_TRIP_SHAKE, HAND_SHAKE, JOLT_SHAKE, LARGE_EXPLOSION_SHAKE, MEDIUM_EXPLOSION_SHAKE, SMALL_EXPLOSION_SHAKE, ROAD_VIBRATION_SHAKE, SKY_DIVING_SHAKE, VIBRATE_SHAKE)
                intensity = 0.8 -- how intense the shake should be
            },
            ScreenFLash = { -- Adds a Screen flashing effect
                enabled = false,
                time = 30
            },
            Custom = {
                enabled = false,
                effectName = "test_effect",
                transition = 100,
                time = 3000
            },
            Status = {
                enabled = true,
                statusName = "weedsmell", -- See the docs (https://creative-development.gitbook.io/cr-effects/fundamentals/installation#what-all-the-different-things-mean-and-what-they-do)
                time = 200 -- how long in seconds
            }
        },
        progressBar = {
            enabled = true, -- If you want to enable the progressbar or not
            progressBarLength = 10000, -- How long the progressbar should be
            progressBarText = "Smoking weed", -- What the progressbar should display
            animDict = "amb@world_human_drinking@coffee@male@idle_a", -- The animation dictionary
            anim = "idle_c", -- The animation in the animation dictionary
            notifyProgressbarDone = "You smoked weed", -- What to notify then you progressbar is done
            notifyProgressbarFail = "You droped the joint!", -- What to notify then the progressbar fails
            disableMovement = false, -- If you want to be able to move (walk)
            disableCarMovement = false, -- If you want to be able to control the car
            disableMouse = false, -- If you want to be able to move the mouse (look around)
            disableCombat = false,                             -- If you want to be able to fight (punch and stuff)
            propSettings = {
                enabled = true,
                prop = "v_ret_fh_bscup",
                boneId = 28422
            }
        },
    },
    -- Copy above example and add your next one under here
}

What all the different things mean and what they do

Name
information
variables

This need to be a unique name

This is the name of the item you want to make usable and add the effects to

This is what you want to be

notified when you use the item

This is the effect of running faster

enabled: if the effect is enabled for the item or not. time: This is for how long the effect should last in seconds.

Gain a drunk effect

enabled: if the effect is enabled for the item or not. time: This is for how long the effect should last in seconds.

Gain an alien like visual effect

enabled: if the effect is enabled for the item or not. time: This is for how long the effect should last in seconds.

Relieve some stress

enabled: if the effect is enabled for the item or not. amount: how much stress to remove

Gain some health regen

enabled: if the effect is enabled for the item or not. time: This is for how long the effect should last in seconds. rate: How fast to regen health

Sets the player to ragdoll

enabled: if the effect is enabled for the item or not. time: This is for how long the effect should last in seconds.

Makes the player stumble when running

enabled: if the effect is enabled for the item or not. time: This is for how long the effect should last in seconds.

Relieve some thirst

enabled: if the effect is enabled for the item or not. amount: how much thirst to relieve

Relieve some hunger

enabled: if the effect is enabled for the item or not. amount: how much hunger to relieve

Gain more stamina so you can run longer

enabled: if the effect is enabled for the item or not. time: This is for how long the effect should last in seconds.

Makes the players screen shake

enabled: if the effect is enabled for the item or not. time: This is for how long the effect should last in seconds. CameraShakeType: what the type of camerashake you want, can be: DEATH_FAIL_IN_EFFECT_SHAKE, DRUNK_SHAKE, FAMILY5_DRUG_TRIP_SHAKE, HAND_SHAKE, JOLT_SHAKE, LARGE_EXPLOSION_SHAKE, MEDIUM_EXPLOSION_SHAKE, SMALL_EXPLOSION_SHAKE, ROAD_VIBRATION_SHAKE, SKY_DIVING_SHAKE, VIBRATE_SHAKE intensity: How intense the shake should be.

Adds a screen flashing effect to the players screen

enabled: if the effect is enabled for the item or not. time: This is for how long the effect should last in seconds.

Adds a custom visiual effect

enabled: if the effect is enabled for the item or not.

effectName: The name of the custom effect (see more in custom effects).

transition: How long the transition is for the effect to be at full strength in MS.

strength: How strong the effect should be. time: This is for how long the effect should last in MS.

Adds a status "effect" that police can inspect.

statusName: See The different status names time: This is for how long the effect should last in Seconds.

The progressbar settings for each item

name
information

If the progressbar is enabled or not. if false then you can ignore the below settings

How long the progressbar should be

What to display in the progressbar text

This is the dictionary your animation is in

This is the animation

This is what is getting notified when the progressbar is done

This is what is getting notified when the progressbar fails

This disables the players movement (walking) while in the progressbar

This disables the ability to control the car

This disables the mouse movement (looking around)

This disables the the ability to be in combat (punch players etc)

Propsettings

Name
Information

If you want a prop or not

This is the name of the prop

This is the id of the "bone" See this list of bones: https://wiki.rage.mp/index.php?title=Bonesarrow-up-right

The different status names

Creating new items

  • Copy the above example and paste it underneath.

  • Edit all the variables to match for your item.

  • that's it.

Last updated