🛠️Installation

Step1: Adding the resource to your server

  • Drag and drop the cr-effects folder to your resource folder.

  • Make sure you install the dependancies: qb-core, progressbar.

  • Make sure you have the below start order in your server.cfg.

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
["example"]

This need to be a unique name

name 

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

useItemText 

This is what you want to be

notified when you use the item

speed

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.

drunk 

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.

alienEffect 

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.

relieveStress 

Relieve some stress

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

healthRegen 

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

ragDoll 

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.

stumble 

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.

reliveThirst 

Relieve some thirst

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

reliveHunger 

Relieve some hunger

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

stamina 

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.

CameraShake 

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.

ScreenFLash 

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.

Custom 

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.

Status

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
enabled 

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

progressBarLength 

How long the progressbar should be

progressBarText 

What to display in the progressbar text

animDict 

This is the dictionary your animation is in

anim 

This is the animation

notifyProgressbarDone 

This is what is getting notified when the progressbar is done

notifyProgressbarFail 

This is what is getting notified when the progressbar fails

disableMovement 

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

disableCarMovement 

This disables the ability to control the car

disableMouse 

This disables the mouse movement (looking around)

disableCombat 

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

Propsettings

Name
Information
enabled

If you want a prop or not

prop

This is the name of the prop

boneId

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

The different status names

'fight'
'widepupils'
'redeyes'
'weedsmell'
'gunpowder'
'chemicals'
'heavybreath'
'sweat'
'handbleed'
'confused'
'alcohol'
"heavyalcohol"
"agitated"

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