βοΈConfiguration
Basic explanation:
--Administration--
Config.UIKey = 'F7' -- The keybind that opens up the in-game UI.
Config.Command = 'consumables' -- The command that opens up the in-game UI.
Config.UpdateChecker = true -- Set to false if you don't want to check for resource update on server startup.
Config.AdminCommands = true -- Set to false if you don't want admins to be able to set players hunger and thirst.
Config.Debug = false -- Set to false if you don't want debug logs printing in client and server consoles
-- Inventory --
Config.Inventory = 'OX' -- Options: 'QB', 'PS', 'OX', 'CodeM', 'Quasar', 'Tgiann', 'Origen', 'Custom'
Config.InventoryImagePath = 'nui://ox_inventory/web/images/%s.png' -- Path to item images for the UI.
-- Progressbar --
Config.Progressbar = 'QB' -- 'QB' | 'OX' | 'Custom' | false
-- Notify --
Config.Notify = 'QB' -- 'QB' | 'OX' | 'Custom' | false
-- Stress --
Config.Stress = 'QB' -- Options: 'QB', 'Custom', false
Config.Translations = {
NotifyCancelled = {
title = ' ',
text = 'You have cancelled!',
texttype = 'error',
duration = 5,
icon = 'fa-solid fa-utensils',
},
MaxUses = {
title = ' ',
text = 'You have reached max uses.',
texttype = 'error',
duration = 5,
icon = 'fa-solid fa-utensils',
},
}
Config.ConsumablesCustom = {
['pixelsandwich'] = {
-- Item removal and receiving
['item'] = {
remove = {
{ item = 'pixelsandwich', amount = 1 } -- Item and amount to remove upon consumable use
},
receive = {
{ item = nil, amount = nil } -- Item and amount to receive upon consumable use (set to nil for no item)
},
maxuses = nil, -- The max amount of times the item can be used per player, per server restart.
},
-- Notification settings (works if using Config.Notify)
['notify'] = {
title = ' ', -- Title for the notification
text = 'You have finished eating!', -- Text to display in the notification
texttype = 'success', -- Type of notification (success, error, etc.)
duration = 5, -- Duration of the notification (1 = 1 second)
icon = 'fa-solid fa-utensils', -- Icon for the notification (optional)
},
-- Progressbar settings (works if using Config.Progressbar)
['progress'] = {
title = ' ', -- Title for the progress bar (optional)
text = 'Eating', -- Text for the progress bar
duration = 5, -- Duration of the progress (1 = 1 second)
icon = 'fa-solid fa-utensils', -- Icon for the progress bar (optional)
useWhileDead = false, -- Whether the progress bar can be used while dead
canCancel = false, -- Whether the progress bar can be canceled
},
-- Control restrictions during consumable use.
['controlDisables'] = {
disableMovement = false, -- Disable movement
disableCarMovement = false, -- Disable car movement
disableMouse = false, -- Disable mouse control
disableCombat = true, -- Disable combat
},
-- Animation settings during consumable use.
['animation'] = {
scene = nil, -- Custom animation scene (optional)
animDict = "mp_player_inteat@burger", -- Animation dictionary
anim = "mp_player_int_eat_burger", -- Animation name
duration = 5, -- Duration of the animation (1 = 1 second)
flags = 49, -- Animation flags (optional)
},
-- Custom prop settings for consumable use.
['prop'] = {
model = "bv_sw_blackforestham", -- Model of the prop
bone = 18905, -- The bone of the prop (18905 = left hand, 57005 = right hand)
coords = vector3(0.13, 0.05, 0.03), -- Position of the prop
rotation = vector3(-60.0, 150.0, -10.0), -- Rotation of the prop
},
-- Second custom prop settings for consumable use.
['prop2'] = {
model = nil,
bone = nil,
coords = nil,
rotation = nil,
},
-- Replenish settings (Hunger/Thirst)
['replenish'] = {
type = 'Hunger', -- 'Hunger', 'Thirst' or { 'Hunger', 'Thirst' } for both.
amount = 20, -- Amount to replenish
max = nil, -- The max threshold to replenish to
},
-- Deplete settings (Hunger/Thirst)
['deplete'] = {
type = nil, -- 'Hunger', 'Thirst' or { 'Hunger', 'Thirst' } for both.
amount = nil, -- Amount to deplete (optional)
min = nil, -- The min threshold to deplete to
},
-- Stress settings (works if using Config.Stress)
['stress'] = {
type = nil, -- 'relieve' or 'gain' (optional)
amount = nil, -- Amount to modify stress (optional)
},
-- Alcohol-related settings
['alcohol'] = {
lightalcohol = nil, -- Amount drank where light alcohol effects start
heavyalcohol = nil, -- Amount drank where heavy alcohol effects start
duration = nil, -- Duration of alcohol effects (1 = 1 second)
},
-- Drug-related effects
['drug'] = {
drugeffect = nil, -- Effects like 'psychedelic', 'dizzy', etc.
duration = nil, -- Duration of drug effects (1 = 1 second)
},
-- Buff settings (With or without values)
['buffs'] = {
novaluebuff = nil, -- Buffs without a value (e.g., 'superJump')
valuebuff = nil, -- Buffs with values (e.g., 'runningspeed' = 1.0)
duration = nil, -- Duration of the buffs (1 = 1 second)
}
}
}Examples and lists:
Integration with other scripts:
Last updated