📄Installation Guide
Since the addition of the export system, it is recommended that Jim-Consumables be started before any scripts that use it. We recommend putting it in it's own folder called [jim-consumables] and adding it to your server.cfg like so
SERVER.CFG
# QBCore & Extra stuff
ensure qb-core
ensure qb-target
ensure [ox]
ensure [qb]
ensure [jim-consumables]
ensure [ps]
ensure [standalone]
ensure [jim]
ensure [drugs]
ensure [scripts]
ensure [farm]
ensure [voice]
ensure [maps]
ensure [clothing]
ensure [props]
This script is merely drag and drop for the most part. No need to touch the client or server-side files. Everything is simply in the Config.
CONFIG
Config = {
Debug = false,
Inv = "qb", -- set to "ox" if using ox_ivnentory
Notify = "qb",
UseProgbar = false,
Consumables = {
-- Default QB food and drink item override
--Effects can be applied here, like stamina on coffee for example
["vodka"] = { emote = "vodkab", canRun = false, time = math.random(5000, 6000), stress = 0, heal = 0, armor = 0, type = "alcohol", stats = { effect = "stress", time = 5000, amount = 2, thirst = math.random(10,20), canOD = true }},
["beer"] = { emote = "beer", canRun = false, time = math.random(5000, 6000), stress = math.random(2, 4), heal = 0, armor = 0, type = "alcohol", stats = { thirst = math.random(10,20), canOD = true }},
["whiskey"] = { emote = "whiskey", canRun = false, time = math.random(5000, 6000), stress = math.random(2, 4), heal = 0, armor = 0, type = "alcohol", stats = { thirst = math.random(10,20), canOD = true }},
["sandwich"] = { emote = "sandwich", canRun = false, time = math.random(5000, 6000), stress = math.random(2, 4), heal = 0, armor = 0, type = "food", stats = { hunger = math.random(10,20), }},
["twerks_candy"] = { emote = "egobar", canRun = true, time = math.random(5000, 6000), stress = math.random(2, 4), heal = 0, armor = 0, type = "food", stats = { hunger = math.random(10,20), }},
["snikkel_candy"] = { emote = "egobar", canRun = true, time = math.random(5000, 6000), stress = math.random(2, 4), heal = 0, armor = 0, type = "food", stats = { hunger = math.random(10,20), }},
["tosti"] = { emote = "sandwich", canRun = false, time = math.random(5000, 6000), stress = math.random(2, 4), heal = 0, armor = 0, type = "food", stats = { hunger = math.random(10,20), }},
["coffee"] = { emote = "coffee", canRun = false, time = math.random(5000, 6000), stress = math.random(2, 4), heal = 0, armor = 0, type = "drink", stats = { effect = "stamina", time = 10000, thirst = math.random(10,20), }},
["water_bottle"] = { emote = "drink", canRun = false, time = math.random(5000, 6000), stress = math.random(2, 4), heal = 0, armor = 0, type = "drink", stats = { thirst = math.random(10,20), }},
["kurkakola"] = { emote = "ecola", canRun = false, time = math.random(5000, 6000), stress = math.random(2, 4), heal = 0, armor = 0, type = "drink", stats = { thirst = math.random(10,20), }},
--[[----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Items that effect status changes, like bleeding can cause problems as they are all handled in their own scripts
-- Testing these but they may be best left handled by default scripts
["ifaks"] = { emote = "oxy", time = math.random(5000, 6000), stress = math.random(12, 24), heal = 10, armor = 0, type = "drug", stats = { effect = "heal", amount = 6, widepupils = false, canOD = false } },
["bandage"] = { emote = "oxy", time = math.random(5000, 6000), stress = 0, heal = 10, armor = 0, type = "drug", stats = { effect = "heal", amount = 3, widepupils = false, canOD = false } }, },
]]
--Testing effects & armor with small functionality to drugs - This may be another one left to default scripts
["joint"] = { emote = "smoke3", time = math.random(5000, 6000), stress = math.random(12, 24), heal = 0, armor = 10, type = "drug", stats = { screen = "weed", effect = "armor", widepupils = false, canOD = false } },
["cokebaggy"] = { emote = "coke", time = math.random(5000, 6000), stress = math.random(12, 24), heal = 0, armor = 0, type = "drug", stats = { screen = "focus", effect = "stamina", widepupils = false, canOD = true } },
--["crackbaggy"] = { emote = "coke", time = math.random(5000, 6000), stress = math.random(12, 24), heal = 0, armor = 0, type = "drug", stats = { effect = "heal", widepupils = false, canOD = true } },
["xtcbaggy"] = { emote = "oxy", time = math.random(5000, 6000), stress = math.random(12, 24), heal = 0, armor = 10, type = "drug", stats = { effect = "strength", widepupils = true, canOD = true } },
["oxy"] = { emote = "oxy", time = math.random(5000, 6000), stress = math.random(12, 24), heal = 0, armor = 0, type = "drug", stats = { effect = "heal", widepupils = false, canOD = false } },
["meth"] = { emote = "coke", time = math.random(5000, 6000), stress = math.random(12, 24), heal = 0, armor = 10, type = "drug", stats = { effect = "stamina", widepupils = false, canOD = true } },
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--[[Example item
["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 = "thermal", -- The screen effect to be played when after consuming the item "rampage" "turbo" "focus" "weed" "trevor" "nightvision" "thermal"
effect = "heal", -- The status effect given by the item, "heal" / "stamina"
-- This supports ps-buffs effects "armor" "stress" "swimming" "hacking" "intelligence" "luck" "strength"
time = 10000, -- How long the effect should last (if not added it will default to 10000)
amount = 6, -- 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
},
--Reward Items Variables
-- These can be the only thing in a consumable table and the item will still work
amounttogive = 3, -- Used for "RewardItems", tells the script how many to give
rewards = {
[1] = {
item = "plastic", -- prize item name
max = 10, -- max amount to give (this is put into math.random(1, max) )
rarity = 1, -- the rarity system, 1 being rarest, 4 being most common
},
},
},]]
},
Emotes = {
["drink"] = {"mp_player_intdrink", "loop_bottle", "Drink", AnimationOptions =
{ Prop = "prop_ld_flow_bottle", PropBone = 18905, PropPlacement = {0.12, 0.008, 0.03, 240.0, -60.0},
EmoteMoving = true, EmoteLoop = true, }},
["whiskeyb"] = {"mp_player_intdrink", "loop_bottle", "(Don't Use) Whiskey Bottle", AnimationOptions =
{ Prop = "prop_cs_whiskey_bottle", PropBone = 60309, PropPlacement = {0.0, 0.0, 0.0, 0.0, 0.0},
EmoteMoving = true, EmoteLoop = true }},
["rumb"] = {"mp_player_intdrink", "loop_bottle", "(Don't Use) Rum Bottle", AnimationOptions =
{ Prop = "prop_rum_bottle", PropBone = 18905, PropPlacement = {0.03, -0.18, 0.10, 240.0, -60.0},
EmoteMoving = true, EmoteLoop = true }},
["icream"] = {"mp_player_intdrink", "loop_bottle", "Irish Cream Bottle", AnimationOptions =
{ Prop = "prop_bottle_brandy", PropBone = 18905, PropPlacement = {0.00, -0.26, 0.10, 240.0, -60.0},
EmoteMoving = true, EmoteLoop = true }},
["ginb"] = {"mp_player_intdrink", "loop_bottle", "(Don't Use) Gin Bottle", AnimationOptions =
{ Prop = "prop_tequila_bottle", PropBone = 18905, PropPlacement = {0.00, -0.26, 0.10, 240.0, -60.0},
EmoteMoving = true, EmoteLoop = true }},
["vodkab"] = {"mp_player_intdrink", "loop_bottle", "(Don't Use) Vodka Bottle", AnimationOptions =
{ Prop = 'prop_vodka_bottle', PropBone = 18905, PropPlacement = {0.00, -0.26, 0.10, 240.0, -60.0},
EmoteMoving = true, EmoteLoop = true }},
["crisps"] = {"amb@world_human_drinking@coffee@male@idle_a", "idle_c", "Chrisps", AnimationOptions =
{ Prop = 'v_ret_ml_chips2', PropBone = 28422, PropPlacement = {0.01, -0.05, -0.1, 0.0, 0.0, 90.0},
EmoteLoop = true, EmoteMoving = true, }},
["sandwich"] = {"mp_player_inteat@burger", "mp_player_int_eat_burger", "Sandwich", AnimationOptions =
{ Prop = 'prop_sandwich_01', PropBone = 18905, PropPlacement = {0.13, 0.05, 0.02, -50.0, 16.0, 60.0},
EmoteMoving = true, }},
["beer1"] = {"mp_player_intdrink", "loop_bottle", "Dusche", AnimationOptions =
{ Prop = "prop_beerdusche", PropBone = 18905, PropPlacement = {0.04, -0.14, 0.10, 240.0, -60.0},
EmoteMoving = true, EmoteLoop = true, }},
["beer2"] = {"mp_player_intdrink", "loop_bottle", "Logger", AnimationOptions =
{ Prop = "prop_beer_logopen", PropBone = 18905, PropPlacement = {0.03, -0.18, 0.10, 240.0, -60.0},
EmoteMoving = true, EmoteLoop = true, }},
["beer3"] = {"mp_player_intdrink", "loop_bottle", "AM Beer", AnimationOptions =
{ Prop = "prop_beer_amopen", PropBone = 18905, PropPlacement = {0.03, -0.18, 0.10, 240.0, -60.0},
EmoteMoving = true, EmoteLoop = true, }},
["beer4"] = {"mp_player_intdrink", "loop_bottle", "Pisswasser1", AnimationOptions =
{ Prop = "prop_beer_pissh", PropBone = 18905, PropPlacement = {0.03, -0.18, 0.10, 240.0, -60.0},
EmoteMoving = true, EmoteLoop = true, }},
["beer5"] = {"mp_player_intdrink", "loop_bottle", "Pisswasser2", AnimationOptions =
{ Prop = "prop_amb_beer_bottle", PropBone = 18905, PropPlacement = {0.12, 0.008, 0.03, 240.0, -60.0},
EmoteMoving = true, EmoteLoop = true, }},
["beer6"] = {"mp_player_intdrink", "loop_bottle", "Pisswasser3", AnimationOptions =
{ Prop = "prop_cs_beer_bot_02", PropBone = 18905, PropPlacement = {0.12, 0.008, 0.03, 240.0, -60.0},
EmoteMoving = true, EmoteLoop = true, }},
["ecola"] = {"mp_player_intdrink", "loop_bottle", "E-cola", AnimationOptions =
{ Prop = "prop_ecola_can", PropBone = 18905, PropPlacement = {0.12, 0.008, 0.03, 240.0, -60.0},
EmoteMoving = true, EmoteLoop = true, }},
["sprunk"] = {"mp_player_intdrink", "loop_bottle", "Sprunk", AnimationOptions =
{ Prop = "v_res_tt_can03", PropBone = 18905, PropPlacement = {0.12, 0.008, 0.03, 240.0, -60.0},
EmoteMoving = true, EmoteLoop = true, }},
},
}
Last updated