Configuration
Server Config
Config options are currently limited as this is still a work in progress. Please refer to the item lists below for more detailed setup.
--[[
____ ____ _____ _____ _ _____ ________ ________ _ ____ _____ __ __ ______ _ _ _______
| _ \ / __ \_ _|_ _| | | | __ \| ____\ \ / / ____| | / __ \| __ \| \/ | ____| \ | |__ __|
| |_) | | | || | | | | | | | | | |__ \ \ / /| |__ | | | | | | |__) | \ / | |__ | \| | | |
| _ <| | | || | | | | | | | | | __| \ \/ / | __| | | | | | | ___/| |\/| | __| | . ` | | |
| |_) | |__| || |_ _| |_ | | | |__| | |____ \ / | |____| |___| |__| | | | | | | |____| |\ | | |
|____/ \____/_____|_____| | | |_____/|______| \/ |______|______\____/|_| |_| |_|______|_| \_| |_|
| |
|_| ITEMS
]]
--- Server configuration.
-- @script server/config.lua
--- Here, you can adjust the core setup for the resource.
-- A copy of the server config will be sent to the client where relevant.
--- Main config table
config = config or {}
--- Item list table
item_list = item_list or {}
--- @section General settings
--- @field debug boolean: Enables or disables server-side debug prints for troubleshooting.
config.debug = true
Item Lists
Below is simply to show the default setup for the different item sections within the resource. This is basic this is still an alpha setup. More default items will be added as the project progresses. Things will also be subject to changes as things develop, please be aware of this. Anything commented out in the following items is there to show you what you can use if you require. All items are purely default items to show the system does in fact work. You should build out these item lists specific to your server.
Ammo & Attachments
Ammo
Designated section for ammo types. Currently only includes pistol ammo purely to show the system does indeed work.
item_list.ammo = {
ammo_pistol = {
id = 'ammo_pistol', -- Unique ID for the item, this should match the key.
category = 'ammo', -- Category for the item.
label = 'Pistol Ammo', -- Human readable label for the item.
description = 'Generic pistol ammo useable by pistol weapon types.', -- Item description.
image = 'ammo_pistol.png', -- Image for the item.
model = 'prop_ld_ammo_pack_01', -- Prop model to spawn if item is dropped.
weight = 200, -- Item weight in grams.
max_stack = nil, -- Max amount of items allowed per stack *(this will be used in boii_inventory)*.
unique = false, -- Unique flag for genuinely unique items *(this will be used in boii_inventory)*.
on_use = { -- Define on_use for the item. All items with this section will be initialized as usable on resource start.
progressbar = { -- Runs a progress bar on item use *(coded with boii_ui in mind however is adaptable to any progress bar)*.
header = 'Reloading Weapon..', -- Bar header.
icon = 'fa-solid fa-person-rifle', -- Bar icon.
duration = 2500, -- Bar timer.
disabled_controls = { -- Disables controls whilst bar is active.
-- mouse = false, -- Disables mouse controls.
-- movement = false, -- Disables player movement on foot.
-- car_movement = false, -- Disables player movement in a vehicle
combat = true, -- Disables player combat.
},
on_success = { -- Triggers if the progress bar finished successfully.
event = {
event_type = 'client', -- Event type: 'server' | 'client'
event = 'boii_items:cl:reload_weapon', -- The event to fire.
params = { -- Event parameters.
item = 'ammo_pistol', -- Sending item id to ensure we can retreive correct item.
ammo_count = 12 -- The amount of ammo to add to compatible weapons.
},
-- effects = { }, -- Applies screen effects to player on use, using boii_statuses.
-- buffs = { }, -- Applies a buff to player on use, using boii_statuses.
-- debuffs = { } -- Applies a debuff to player on use, using boii_statuses.
},
notify = { -- Notification sent on success.
type = 'success',
header = 'EATING',
message = 'You reloaded your weapon.',
duration = 3000
},
},
on_cancel = { -- Triggers if the player cancels the progress bar.
notify = { -- Notification sent on cancel.
type = 'error',
header = 'EATING',
message = 'You stopped reloading your weapon..',
duration = 3000
},
}
},
--[[
event = {
event_type = 'client', -- Event type: 'server' | 'client'
event = 'boii_items:cl:reload_weapon', -- The event to fire.
params = { -- Event parameters.
item = 'ammo_pistol', -- Sending item id to ensure we can retreive correct item.
ammo_count = 12 -- The amount of ammo to add to compatible weapons.
},
-- effects = { }, -- Applies screen effects to player on use, using boii_statuses.
-- buffs = { }, -- Applies a buff to player on use, using boii_statuses.
-- debuffs = { } -- Applies a debuff to player on use, using boii_statuses.
}
]]
},
on_drop = { -- If items include this section they become droppable.
event = { -- Event fired when item is dropped.
event_type = 'server', -- Event type: 'server' | 'client'
event = 'boii_items:cl:drop_item', -- The event to fire.
params = { -- Event parameters.
item = 'ammo_pistol' -- Sending item id to ensure we can retreive correct item.
}
}
}
-- data = {} -- Used to store and track additional item data.
}
}
Attachments
Dedicated section for weapon attachments. Currently includes default clips, extended, & flashlights purely to show the system works.
item_list.weapon_attachments = {
default_clip_pistol = {
id = 'default_clip_pistol', -- Unique ID for the item, this should match the key.
category = 'weapon_attachment', -- Category for the item.
label = 'Default Clip: Pistol', -- Human readable lable for the item.
description = 'Default clip for various pistol types.', -- Item description.
image = 'default_clip_pistol.png', -- Image for the item.
model = 'prop_box_guncase_02a', -- Prop model to spawn if item is dropped.
weight = 100, -- Item weight in grams.
max_stack = nil, -- Max amount of items allowed per stack *(this will be used in boii_inventory)*.
unique = false, -- Unique flag for genuinely unique items *(this will be used in boii_inventory)*.
on_use = { -- Define on_use for the item. All items with this section will be initialized as usable on resource start.
progressbar = { -- Runs a progress bar on item use *(coded with boii_ui in mind however is adaptable to any progress bar)*.
header = 'Modifying Weapon...', -- Bar header.
icon = 'fa-solid fa-screwdriver-wrench', -- Bar icon
duration = 2500, -- Bar duration in ms
disabled_controls = { -- Disables controls whilst bar is active.
-- mouse = false, -- Disables mouse controls.
-- movement = false, -- Disables player movement on foot.
-- car_movement = false, -- Disables player movement in a vehicle
combat = true, -- Disables player combat.
},
on_success = { -- Triggers if the progress bar finished successfully.
event = {
event_type = 'client', -- Event type: 'server' | 'client'
event = 'boii_items:cl:modify_weapon', -- The event to fire.
params = { -- Event parameters.
item = 'default_clip_pistol', -- Sending item id to ensure we can retreive correct item.
compatibility = { -- Defines what weapons the attachments are usable by and the corresponding component to equip.
{ weapon = 'weapon_pistol', component = 'COMPONENT_PISTOL_CLIP_01' },
{ weapon = 'weapon_pistol_mk2', component = 'COMPONENT_PISTOL_MK2_CLIP_01' },
{ weapon = 'weapon_combatpistol', component = 'COMPONENT_COMBATPISTOL_CLIP_01' },
{ weapon = 'weapon_appistol', component = 'COMPONENT_APPISTOL_CLIP_01' },
{ weapon = 'weapon_pistol50', component = 'COMPONENT_PISTOL50_CLIP_01' },
{ weapon = 'weapon_revolver', component = 'COMPONENT_REVOLVER_CLIP_01' },
{ weapon = 'weapon_snspistol', component = 'COMPONENT_SNSPISTOL_CLIP_01' },
{ weapon = 'weapon_snspistol_mk2', component = 'COMPONENT_SNSPISTOL_MK2_CLIP_01' },
{ weapon = 'weapon_heavypistol', component = 'COMPONENT_HEAVYPISTOL_CLIP_01' },
{ weapon = 'weapon_vintagepistol', component = 'COMPONENT_VINTAGEPISTOL_CLIP_01' },
{ weapon = 'weapon_ceramicpistol', component = 'COMPONENT_CERAMICPISTOL_CLIP_01' },
},
-- effects = { }, -- Applies screen effects to player on use, using boii_statuses.
-- buffs = { }, -- Applies a buff to player on use, using boii_statuses.
-- debuffs = { } -- Applies a debuff to player on use, using boii_statuses.
}
},
notify = { -- Notification sent on success.
type = 'success',
header = 'Modification Success',
message = 'You modified your weapon.',
duration = 3000
},
},
on_cancel = { -- Triggers if the player cancels the progress bar.
notify = { -- Notification sent on cancel.
type = 'error',
header = 'Modification Cancelled',
message = 'You stopped modifying your weapon.',
duration = 3000
},
}
}
},
--[[
event = {
event_type = 'client', -- Event type: 'server' | 'client'
event = 'boii_items:cl:modify_weapon', -- The event to fire.
params = { -- Event parameters.
item = 'default_clip_pistol', -- Sending item id to ensure we can retreive correct item.
compatibility = { -- Defines what weapons the attachments are usable by and the corresponding component to equip.
{ weapon = 'weapon_pistol', component = 'COMPONENT_PISTOL_CLIP_01' },
{ weapon = 'weapon_pistol_mk2', component = 'COMPONENT_PISTOL_MK2_CLIP_01' },
{ weapon = 'weapon_combatpistol', component = 'COMPONENT_COMBATPISTOL_CLIP_01' },
{ weapon = 'weapon_appistol', component = 'COMPONENT_APPISTOL_CLIP_01' },
{ weapon = 'weapon_pistol50', component = 'COMPONENT_PISTOL50_CLIP_01' },
{ weapon = 'weapon_revolver', component = 'COMPONENT_REVOLVER_CLIP_01' },
{ weapon = 'weapon_snspistol', component = 'COMPONENT_SNSPISTOL_CLIP_01' },
{ weapon = 'weapon_snspistol_mk2', component = 'COMPONENT_SNSPISTOL_MK2_CLIP_01' },
{ weapon = 'weapon_heavypistol', component = 'COMPONENT_HEAVYPISTOL_CLIP_01' },
{ weapon = 'weapon_vintagepistol', component = 'COMPONENT_VINTAGEPISTOL_CLIP_01' },
{ weapon = 'weapon_ceramicpistol', component = 'COMPONENT_CERAMICPISTOL_CLIP_01' },
},
-- effects = { }, -- Applies screen effects to player on use, using boii_statuses.
-- buffs = { }, -- Applies a buff to player on use, using boii_statuses.
-- debuffs = { } -- Applies a debuff to player on use, using boii_statuses.
}
},
effects = { }, -- Applies screen effects to player on use, using boii_statuses.
buffs = { }, -- Applies a buff to player on use, using boii_statuses.
debuffs = { } -- Applies a debuff to player on use, using boii_statuses.
]]
on_drop = { -- If items include this section they become droppable.
event = { -- Event fired when item is dropped.
event_type = 'server', -- Event type: 'server' | 'client'
event = 'boii_items:cl:drop_item', -- The event to fire.
params = { -- Event parameters.
item = 'default_clip_pistol' -- Sending item id to ensure we can retreive correct item.
}
}
}
},
}
Clothing
Dedicated section for usable clothing items. Currently only includes body armour simply to show the system does indeed work.
item_list.clothing = {
body_armour = {
id = 'body_armour', -- Unique ID for the item, this should match the key.
category = 'clothing', -- Category for the item.
label = 'Body Armour', -- Human readable label for the item.
description = 'A simple protective vest.', -- Item description.
image = 'body_armour.png', -- Image for the item.
model = 'prop_armour_pickup', -- Prop model to spawn if item is dropped.
weight = 500, -- Item weight in grams.
max_stack = nil, -- Max amount of items allowed per stack *(this will be used in boii_inventory)*.
unique = false, -- Unique flag for genuinely unique items *(this will be used in boii_inventory)*.
on_use = { -- Define on_use for the item. All items with this section will be initialized as usable on resource start.
event = { -- Event to run when item is used.
event_type = 'client', -- Event type: 'server' | 'client'
event = 'boii_items:cl:equip_clothing', -- The event to fire.
params = { -- Event parameters.
item = 'body_armour', -- Sending item id to ensure we can retreive correct item.
clothing = { -- Clothing values.
m = { component = 9, drawable = 12, texture = 0 }, -- mp_m_freemode_01
f = { component = 9, drawable = 8, texture = 0 } -- mp_f_freemode_01
}
}
}
},
on_drop = { -- If items include this section they become droppable.
event = { -- Event fired when item is dropped.
event_type = 'server', -- Event type: 'server' | 'client'
event = 'boii_items:cl:drop_item', -- The event to fire.
params = { -- Event parameters.
item = 'body_armour' -- Sending item id to ensure we can retreive correct item.
}
}
}
-- data = {} -- Used to store and track additional item data.
}
}
Consumables
Dedicated section for consumables i.e. food & drinks. Currently includes water & burger simply to show the system does indeed work.
item_list.consumables = {
water = {
id = 'water', -- Unique ID for the item, this should match the key.
category = 'consumables', -- Category for the item.
label = 'Water', -- Human readable lable for the item.
description = 'A refreshing bottle of water.', -- Item description.
image = 'water.png', -- Image for the item.
model = 'ba_prop_club_water_bottle', -- Prop model to spawn if item is dropped.
weight = 1, -- Item weight in grams.
max_stack = nil, -- Max amount of items allowed per stack *(this will be used in boii_inventory)*.
unique = false, -- Unique flag for genuinely unique items *(this will be used in boii_inventory)*.
on_use = { -- Define on_use for the item. All items with this section will be initialized as usable on resource start.
progressbar = { -- Runs a progress bar on item use *(coded with boii_ui in mind however is adaptable to any progress bar)*.
header = 'Drinking Water..', -- Bar header.
icon = 'fa-solid fa-water', -- Bar icon
duration = 2500, -- Bar duration in ms
animation = { dict = 'mp_player_intdrink', anim = 'loop_bottle', flags = 49, blend_in = 8.0, blend_out = -8.0, duration = -1, playback = 1, lock_x = 0, lock_y = 0, lock_z = 0 }, -- Animation to run whilst bar is active.
props = { -- Props to use when running bar *(boii_ui supports unlimited props, most othe progress bars only support 2)*.
{ model = 'ba_prop_club_water_bottle', bone = 60309, coords = vector3(0.0, 0.0, 0.05), rotation = vector3(0.0, 0.0, 0.0), soft_pin = false, collision = false, is_ped = true, rot_order = 1, sync_rot = true } -- Prop to create and attach to player.
},
--[[
disabled_controls = { -- Disables controls whilst bar is active.
mouse = false, -- Disables mouse controls.
movement = false, -- Disables player movement on foot.
car_movement = false, -- Disables player movement in a vehicle
combat = false, -- Disables player combat.
},
]]
on_success = { -- Triggers if the progress bar finished successfully.
event = {
event_type = 'server', -- Event type: 'server' | 'client'
event = 'boii_items:sv:consume_item', -- The event to fire.
params = { -- Event parameters.
item = 'water', -- Sending item id to ensure we can retreive correct item.
statuses = { -- Statuses can be adjusted. You can use all of them or just one of them, entirely up to you.
--health = { add = 0, remove = 0 },
--armour = { add = 0, remove = 0 },
hunger = { add = 3, remove = 0 },
thirst = { add = 20, remove = 0 },
stress = { add = 0, remove = 5 },
--stamina = { add = 0, remove = 0 },
--oxygen = { add = 0, remove = 0 },
--hygiene = { add = 0, remove = 0 },
},
-- effects = { }, -- Applies screen effects to player on use, using boii_statuses.
-- buffs = { }, -- Applies a buff to player on use, using boii_statuses.
-- debuffs = { } -- Applies a debuff to player on use, using boii_statuses.
},
},
notify = { -- Notification sent on success.
type = 'success',
header = 'DRINKING',
message = 'You drank a bottle of water.',
duration = 3000
},
},
on_cancel = { -- Triggers if the player cancels the progress bar.
notify = { -- Notification sent on cancel.
type = 'error',
header = 'DRINKING',
message = 'You stopped drinking your water..',
duration = 3000
},
}
},
--[[
event = { -- Use events directly without the need for a progress bar.
event_type = 'server', -- Event type: 'server' | 'client'
event = 'boii_items:sv:consume_item', -- The event to fire.
params = { -- Event parameters.
item = 'water', -- Sending item id to ensure we can retreive correct item.
statuses = { -- Statuses can be adjusted. You can use all of them or just one of them, entirely up to you.
health = { add = 0, remove = 0 },
armour = { add = 0, remove = 0 },
hunger = { add = 3, remove = 0 },
thirst = { add = 20, remove = 0 },
stress = { add = 0, remove = 0 },
stamina = { add = 0, remove = 0 },
oxygen = { add = 0, remove = 0 },
hygiene = { add = 0, remove = 0 },
},
effects = { }, -- Applies screen effects to player on use, using boii_statuses.
buffs = { }, -- Applies a buff to player on use, using boii_statuses.
debuffs = { } -- Applies a debuff to player on use, using boii_statuses.
},
},
effects = { }, -- Applies screen effects to player on use, using boii_statuses.
buffs = { }, -- Applies a buff to player on use, using boii_statuses.
debuffs = { } -- Applies a debuff to player on use, using boii_statuses.
]]
},
on_drop = { -- If items include this section they become droppable.
event = { -- Event fired when item is dropped.
event_type = 'server', -- Event type: 'server' | 'client'
event = 'boii_items:cl:drop_item', -- The event to fire.
params = { -- Event parameters.
item = 'water' -- Sending item id to ensure we can retreive correct item.
}
}
},
data = { -- Used to store and track additional item data.
quality = 100 -- Quality of consumables this will be used for degrading food/drinks in a future update.
}
},
}
Finance
Dedicated section for finance items i.e. cash, bank cards.. etc.
item_list.finance = {
cash = {
id = 'cash', -- Unique ID for the item, this should match the key.
category = 'finance', -- Category for the item.
label = 'Cash', -- Human readable label for the item.
description = 'Cash moves everything around me..', -- Item description.
image = 'cash.png', -- Image for the item.
weight = 1, -- Item weight in grams.
max_stack = nil, -- Max amount of items allowed per stack *(this will be used in boii_inventory)*.
unique = false, -- Unique flag for genuinely unique items *(this will be used in boii_inventory)*.
},
}
Kits
Dedicated section for kits i.e. weapon repair kits, vehicle tool kits.. etc. Currently only includes the pistol repair kit simply to show the system does indeed work.
item_list.kits = {
repair_kit_pistol = {
id = 'repair_kit_pistol', -- Unique ID for the item, this should match the key.
category = 'kits', -- Category for the item.
label = 'Pistol Repair Kit', -- Human readable label for the item.
description = 'A kit for repairing standard issue pistols. Restores up to 50% of the weapon\'s durability.', -- Item description.
image = 'repair_kit_pistol.png', -- Image for the item.
model = 'prop_toolchest_01', -- Prop model to spawn if item is dropped.
weight = 500, -- Item weight in grams.
max_stack = nil, -- Max amount of items allowed per stack *(this will be used in boii_inventory)*.
unique = false, -- Unique flag for genuinely unique items *(this will be used in boii_inventory)*.
on_use = { -- Define on_use for the item. All items with this section will be initialized as usable on resource start.
progressbar = { -- Runs a progress bar on item use *(coded with boii_ui in mind however is adaptable to any progress bar)*.
header = 'Repairing Weapon..', -- Bar header.
icon = 'fa-solid fa-screwdriver-wrench', -- Bar icon.
duration = 5500, -- Bar timer.
animation = { dict = 'mini@repair', anim = 'fixing_a_ped', flags = 49, blend_in = 8.0, blend_out = -8.0, duration = -1, playback = 1, lock_x = 0, lock_y = 0, lock_z = 0 }, -- Animation to run whilst bar is active.
-- props = {}, -- Props to use when running bar *(boii_ui supports unlimited props, most othe progress bars only support 2)*.
--[[
disabled_controls = { -- Disables controls whilst bar is active.
mouse = false, -- Disables mouse controls.
movement = false, -- Disables player movement on foot.
car_movement = false, -- Disables player movement in a vehicle
combat = false, -- Disables player combat.
},
]]
on_success = { -- Triggers if the progress bar finished successfully.
event = {
event_type = 'client', -- Event type: 'server' | 'client'
event = 'boii_items:cl:repair_weapon', -- The event to fire.
params = { -- Event parameters.
item = 'repair_kit_pistol', -- Sending item id to ensure we can retreive correct item.
repair_amount = 50, -- The amount to be added to the weapons durability.
compatible = { -- Table of compatible weapons.
'weapon_pistol', 'weapon_pistol_mk2', 'weapon_combatpistol'
}
},
-- effects = { }, -- Applies screen effects to player on use, using boii_statuses.
-- buffs = { }, -- Applies a buff to player on use, using boii_statuses.
-- debuffs = { } -- Applies a debuff to player on use, using boii_statuses.
},
notify = { -- Notification sent on success.
type = 'success',
header = 'Weapon Repair',
message = 'You used a pistol repair kit.',
duration = 3000
},
},
on_cancel = { -- Triggers if the player cancels the progress bar.
notify = { -- Notification sent on cancel.
type = 'error',
header = 'DRINKING',
message = 'You stopped drinking your water..',
duration = 3000
},
}
}
--[[
event = {
event_type = 'client', -- Event type: 'server' | 'client'
event = 'boii_items:cl:repair_weapon', -- The event to fire.
params = { -- Event parameters.
item = 'repair_kit_pistol', -- Sending item id to ensure we can retreive correct item.
repair_amount = 50, -- The amount to be added to the weapons durability.
compatible = { -- Table of compatible weapons.
'weapon_pistol', 'weapon_pistol_mk2', 'weapon_combatpistol'
}
},
-- effects = { }, -- Applies screen effects to player on use, using boii_statuses.
-- buffs = { }, -- Applies a buff to player on use, using boii_statuses.
-- debuffs = { } -- Applies a debuff to player on use, using boii_statuses.
},
effects = { }, -- Applies screen effects to player on use, using boii_statuses.
buffs = { }, -- Applies a buff to player on use, using boii_statuses.
debuffs = { } -- Applies a debuff to player on use, using boii_statuses.
]]
},
on_drop = { -- If items include this section they become droppable.
event = { -- Event fired when item is dropped.
event_type = 'server', -- Event type: 'server' | 'client'
event = 'boii_items:cl:drop_item', -- The event to fire.
params = { -- Event parameters.
item = 'repair_kit_pistol' -- Sending item id to ensure we can retreive correct item.
}
}
}
-- data = {}
}
}
Weapons
Dedicated section for weapons. Currently only includes the standard pistol simply to show that the system does indeed work.
item_list.weapons = {
weapon_pistol = {
id = 'weapon_pistol', -- Unique ID for the item, this should match the key.
category = 'weapons', -- Category for the item.
label = 'Pistol', -- Human readable lable for the item.
description = 'A standard semi-automatic handgun.', -- Item description.
image = 'weapon_pistol.png', -- Image for the item.
model = 'prop_box_guncase_01a', -- Prop model to spawn if item is dropped.
weight = 1500, -- Item weight in grams.
max_stack = nil, -- Max amount of items allowed per stack *(this will be used in boii_inventory)*.
unique = false, -- Unique flag for genuinely unique items *(this will be used in boii_inventory)*.
ammo_types = { 'ammo_pistol' }, -- Table of supported ammo types; ammo must be setup correctly in item_list.ammo.
on_drop = { -- If items include this section they become droppable.
event = { -- Event fired when item is dropped.
event_type = 'server', -- Event type: 'server' | 'client'
event = 'boii_items:cl:drop_item', -- The event to fire.
params = { -- Event parameters.
item = 'weapon_pistol' -- Sending item id to ensure we can retreive correct item.
}
}
},
data = { -- Used to store and track additional item data.
ammo = 0, -- Starting ammo when a weapon is first received.
attachments = {}, -- Table to store equipped attachments.
durability = 100 -- Starting durability when a weapon is first received.
}
}
}
Last updated