Information - 'BG-CONSUMABLES RE EDIT BY B4DBOY {BG DEVELOPER}'
Discord - https://discord.gg/gNcatbjMkf

# bg-consumables

Consumables Script For Qbcore

# What is this?

This Script Is Designed As A Replacement / Override For Food And Drink Consumables In qb-smallresources

It's Main Purpose Was To Make It Possible To Not Stand Up While Sitting Due To Lazy Events Such As Clearpedtasks In Most Scripts, This One Is Designed To Cancel The Animation You Have Chosen, Not All Animations. This Includes Progressbar.

# Installation

```
Please Stop Asking To How Add A Progressbar Please

This Script Was Designed To Not Need One, Because Of How It Cancels All The Player Animations Instantly.

You Can Manage Without A Progressbar.

```
This Script Is Recommended To Be Ran Last/At The Bottom Of Your Server.Cfg Because This Is Intended To Take Control Of Items, If Ran Too Early The Original Script May Override This One.

It Already Takes Control Of Default Qbcore Food And Drink, But You Would Probably Want To Add More.

To Add An Item, You Only Need To Add A New Item Table In The Config.Consumables Like This :

```lua

["heartstopper"] = {
	emote = "burger",			-- Select an emote from below, it has to be in here
	time = math.random(5000, 6000),		-- Amount of time it takes to consume the item
	stress = math.random(1, 2),		-- Amount of stress relief, can be 0
	heal = 0,				-- Set amount to heal by after consuming
	armor = 5,				-- Amount of armor to add
	type = "food",				-- Type: "alcohol" / "drink" / "food"
	stats = {
		screen = "rampage",		-- The screen effect to be played when after consuming the item
		effect = "heal", 		-- The status effect given by the item, "heal" / "stamina"
		time = 10000,			-- How long the effect should last (if not added it will default to 10000)
		amount = 2,			-- How much the value is changed by per second
		hunger = math.random(10,20),	-- The hunger/thirst stats of the item, if not found in the items.lua
		thirst = math.random(10,20),	-- The hunger/thirst stats of the item, if not found in the items.lua
	},
},

```
Consuming An Item Can Also Manually Activate Screen Effects

The Example Above Uses `rampage` As This Is What The Effect Is Named After, You Can Use It For Any Item You Think Best

```lua

-- The Current List Of Screen Effects Are :

	"turbo"
	"focus"
	"rampage"
	"weed"
	"trevor"
	"nightvision"
	"thermal"

```

## ps-buffs Support

This Scripts Can Be Expanded With Ps-buffs (https://github.com/Project-Sloth/ps-buffs)

If This Script Is Enabled It Will Automatically Try To Use Their System To Apply Buffs :

```lua

-- The extra buffs that can be set include :

	"heal"			-- Health recovery buff
	"stamina"		-- Stamina recovery buff
	"swimming"		-- Swimming speed buff
	"stress"		-- Stress recovery buff
	"armor"			-- Armour recovery buff
	"hacking"		-- Hacking effect
	"intelligence"		-- Intelligence effect
	"luck"			-- Luck effect
	"strength"		-- Strength effect

```

This Script Supports Dpemotes Style Emotes, So If You Have Some That You Want To Be Triggered When Eating Or Drinking Drop It In The Config.Emotes Section