Skip to content

Instantly share code, notes, and snippets.

@jag-dev
Last active May 3, 2023 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jag-dev/f4f6f95aebedf2461daf4897e7e64fa5 to your computer and use it in GitHub Desktop.
Save jag-dev/f4f6f95aebedf2461daf4897e7e64fa5 to your computer and use it in GitHub Desktop.
Prison Life Config [QBCore]
Config = {}
----------------------------------------------------------------------------
-- FRAMEWORK SETTINGS
--
-- Supported third-eye tagrting systems:
-- [qb-target, ox_target, qtarget]
-- Other target systems that follow combability for these may work as well
----------------------------------------------------------------------------
Config.frameworks = {
qbEnabled = true, -- Using QBCore
esxEnabled = false, -- Using ESX
useTargeting = true, -- Using targeting system
useOxLib = false, -- Use ox_lib for menus and notifications
targetSystem = 'qb-target', -- Type of system (qb-target, ox_target, qtarget)
}
----------------------------------------------------------------------------
-- GLOBAL SETTINGS
--
-- All ped models, menus, and interaction points are configurable.
-- Time related settings are based in seconds
--
-- Ped Model Reference: https://docs.fivem.net/docs/game-references/ped-models/
-- Menu Icon Reference: https://fontawesome.com/search
----------------------------------------------------------------------------
Config.settings = {
maxDiceThrow = 6, -- Max dice results to display
prunoThirst = 20, -- How much water to give player drinking pruno
prunoArmour = 10, -- How much armour to give player drinking pruno
prunoDrinkTime = 10, -- How long to drink pruno
prunoDuration = 60, -- How long drunk effect lasts
prunoMakeTime = 60, -- How long to ferment pruno
prunoMakeLocation = vector4(1742.93, 2492.25, 45.84, 216.63), -- Secret pruno spot
prisonRollArmour = 20, -- How much armor to give player smoking
prisonRollDuration = 60, -- How long does high effect last
prisonRollMakeTime = 5, -- How long to roll the spliff
prisonRollSmokeTime = 10, -- How long for smoke animation
gangTaskTime = 120, -- How long to complete a gang-related task
gangTaskCooldown = 300, -- Cooldown between doing gang tasks
beatdownPedModel = `s_m_y_prisoner_01`, -- Model for ped to beat up
beatdownLocation = vector4(1733.92, 2498.15, 45.84, 301.57), -- Where beatdown model spawns
bribePedModel = `s_m_m_prisguard_01`, -- Guard being bribed model
bribeLocations = {
-- Locations for bribing guards
vector4(1775.71, 2553.67, 44.56, 90.66),
vector4(1722.66, 2495.32, 44.56, 69.89),
vector4(1699.16, 2535.91, 44.56, 272.06),
vector4(1656.94, 2548.91, 45.56, 323.18),
},
lockerLocations = {
-- Locations for searching lockers
vector4(1728.89, 2500.56, 49.23, 215.25),
vector4(1736.17, 2495.53, 49.23, 35.88),
vector4(1732.85, 2487.91, 49.23, 309.62),
vector4(1740.38, 2492.91, 49.23, 109.43),
},
bedLocations = {
-- Locations for searching beds
vector4(1782.21, 2490.82, 45.85, 101.94),
vector4(1767.57, 2504.71, 45.85, 293.02),
vector4(1740.4, 2488.35, 49.24, 104.9),
vector4(1760.4, 2477.51, 49.24, 185.27),
},
jobPedModel = `s_m_m_armoured_01`, -- Ped model for job selection
jobPedLocation = vector4(1740.82, 2477.2, 44.85, 298.6), -- Location of job selection ped
commissaryModel = `mp_m_shopkeep_01`, -- Ped model for commissary
commissaryLocation = vector4(1790.09, 2557.0, 44.62, 133.83), -- Location of comissary ped
commissaryItems = {
-- Items to purchased from commissary
--
-- [name] - Name displayed in menu
-- [id] - Unique ID (must all be different)
-- [price] - Price of the item
-- [item] - Item to be given
-- [icon] - Icon displayed in menu
-- [description] - Description displayed in menu
{
name = 'Sandwich',
id = 'sandwichitem',
price = 1.0,
item = 'sandwich',
icon = 'fa-solid fa-arrow-right',
description = 'A nice simple prison sandwich'
},
{
name = 'Water Bottle',
id = 'wateritem',
price = 1.0,
item = 'water_bottle',
icon = 'fa-solid fa-arrow-right',
description = 'A nice bottle of water'
},
{
name = 'Stamp',
id = 'stampitem',
price = 10.0,
item = 'stamp',
icon = 'fa-solid fa-arrow-right',
description = 'A stamp only used for sending mail'
},
{
name = 'Dice',
id = 'diceitem',
price = 25.0,
item = 'die',
icon = 'fa-solid fa-arrow-right',
description = 'A die for playing games'
},
},
}
----------------------------------------------------------------------------
-- GANG SETTINGS
--
-- Build custom gangs with unique task sets and rewards
--
-- Scenario Reference: https://pastebin.com/n9vPgyaB
-- Available Tasks: 'beatdown', 'bribe', 'lockers', 'beds', 'pruno'
----------------------------------------------------------------------------
Config.gangs = {
-- List custom gangs here
--
-- [name] - Name of gang
-- [joinMessage] - Message when player joins
-- [tasks] - List of available tasks, they are selected at random
-- [tasksForReward] - How many tasks until they can claim reward
-- [rewardLoot] - Items received when hitting enough completed tasks
-- [peds] - Gang-related peds, the FIRST ped in the list is the one players interact with
-- [model] - Ped model
-- [scenario] - Action the ped is doing
-- [location] - Location of ped
-- [tradeItems] - Items the players can trade the gang for
-- [name] - Name displayed in menu
-- [id] - Unique ID (must all be different)
-- [price] - Price of the item
-- [item] - Item to be given
-- [icon] - Icon displayed in menu
-- [description] - Description displayed in menu
{
name = 'Los Aztecas',
joinMessage = 'Welcome to la familia holmes',
tasks = { 'pruno', 'lockers', 'bribe' },
tasksForReward = 7,
rewardLoot = { {item='stamp', amount=3}, {item='prison_nug', amount=1}, {item='pruno', amount=2}, },
peds = {
{
-- BOSS PED
model = `s_m_y_prisoner_01`,
scenario = 'PROP_HUMAN_SEAT_CHAIR_FOOD',
location = vector4(1787.67, 2545.58, 44.25, 71.73),
},
{
model = `s_m_y_prisoner_01`,
scenario = 'WORLD_HUMAN_GUARD_STAND',
location = vector4(1787.22, 2543.65, 44.62, 36.46),
},
{
model = `s_m_y_prisoner_01`,
scenario = 'WORLD_HUMAN_JANITOR',
location = vector4(1789.5, 2546.32, 44.62, 35.92),
},
},
tradeItems = {
{
name = 'Weed Nugget',
id = 'nugitem',
price = 15,
item = 'prison_nug',
icon = 'fa-solid fa-arrow-right',
description = 'A small nug of terrible looking bud'
},
{
name = 'Prison Shank',
id = 'knifeitem',
price = 75,
item = 'knife',
icon = 'fa-solid fa-arrow-right',
description = 'A knife to shank people with'
},
{
name = 'Radio',
id = 'radioitem',
price = 100,
item = 'radio',
icon = 'fa-solid fa-arrow-right',
description = 'A radio for communication'
},
},
},
{
name = 'East Side Ballas',
joinMessage = 'Welcome to the family homie',
tasks = { 'beatdown', 'bribe', 'lockers', 'beds', 'pruno' },
tasksForReward = 5,
rewardLoot = { {item='stamp', amount=2}, {item='stamp', amount=5} },
peds = {
{
-- BOSS PED
model = `s_m_y_prismuscl_01`,
scenario = 'WORLD_HUMAN_AA_SMOKE',
location = vector4(1745.05, 2535.28, 44.56, 293.65),
},
{
model = `s_m_y_prismuscl_01`,
scenario = 'WORLD_HUMAN_GUARD_STAND',
location = vector4(1745.38, 2536.94, 44.56, 238.84),
},
{
model = `s_m_y_prismuscl_01`,
scenario = 'WORLD_HUMAN_LEANING',
location = vector4(1744.53, 2533.71, 44.56, 212.19),
},
},
tradeItems = {
{
name = 'Weed Nugget',
id = 'nugitem',
price = 15,
item = 'prison_nug',
icon = 'fa-solid fa-arrow-right',
description = 'A small nug of terrible looking bud'
},
{
name = 'Prison Shank',
id = 'knifeitem',
price = 75,
item = 'knife',
icon = 'fa-solid fa-arrow-right',
description = 'A knife to shank people with'
},
{
name = 'Radio',
id = 'radioitem',
price = 100,
item = 'radio',
icon = 'fa-solid fa-arrow-right',
description = 'A radio for communication'
},
},
},
{
name = 'Lost MC',
joinMessage = 'Welcome to the club friend',
tasks = { 'beatdown', 'bribe', 'lockers', 'beds' },
tasksForReward = 15,
rewardLoot = { {item='stamp', amount=7}, {item='prison_roll', amount=2} },
peds = {
{
-- BOSS PED
model = `s_m_y_prisoner_01`,
scenario = 'PROP_HUMAN_SEAT_CHAIR_UPRIGHT',
location = vector4(1757.1, 2498.19, 47.85, 300.87),
},
{
model = `s_m_y_prisoner_01`,
scenario = 'WORLD_HUMAN_GUARD_STAND',
location = vector4(1763.01, 2498.76, 48.24, 218.01),
},
{
model = `s_m_y_prisoner_01`,
scenario = 'WORLD_HUMAN_GUARD_STAND',
location = vector4(1757.58, 2500.02, 48.24, 255.14),
},
},
tradeItems = {
{
name = 'Weed Nugget',
id = 'nugitem',
price = 15,
item = 'prison_nug',
icon = 'fa-solid fa-arrow-right',
description = 'A small nug of terrible looking bud'
},
{
name = 'Prison Shank',
id = 'knifeitem',
price = 75,
item = 'knife',
icon = 'fa-solid fa-arrow-right',
description = 'A knife to shank people with'
},
{
name = 'Radio',
id = 'radioitem',
price = 100,
item = 'radio',
icon = 'fa-solid fa-arrow-right',
description = 'A radio for communication'
},
},
},
}
----------------------------------------------------------------------------
-- JOB SETTINGS
--
-- Settings and locations relating to prison jobs
----------------------------------------------------------------------------
Config.jobs = {
requiredTasks = 5, -- How many tasks for a job to be complete
taskTime = 10, -- How long does it take to perform a job task
dumpsterLocation = vector4(1768.56, 2565.6, 44.56, 0.0), -- Location of dumpster
trashLocations = {
-- Locations of trash bins
vector4(1764.95, 2483.52, 44.85, 0.0),
vector4(1768.86, 2501.63, 44.85, 0.0),
vector4(1740.62, 2537.15, 44.56, 0.0),
vector4(1701.64, 2551.73, 44.56, 0.0),
vector4(1687.35, 2502.76, 44.56, 0.0),
vector4(1668.47, 2517.31, 44.56, 0.0),
vector4(1630.17, 2543.29, 45.56, 0.0),
},
electricalLocations = {
-- Locations of electrical job tasks
vector4(1761.56, 2540.48, 45.56, 195.39),
vector4(1718.57, 2527.77, 45.56, 294.74),
vector4(1664.81, 2501.68, 45.56, 173.85),
vector4(1627.87, 2538.47, 45.56, 177.9),
vector4(1663.04, 2635.6, 45.56, 171.99),
vector4(1726.45, 2664.67, 45.56, 179.75),
},
cleaningLocations = {
-- Locations of cleaning job tasks
vector4(1753.0, 2489.55, 44.84, 84.24),
vector4(1769.97, 2488.08, 44.86, 239.81),
vector4(1756.59, 2546.01, 44.56, 217.12),
vector4(1710.37, 2536.69, 44.56, 102.49),
vector4(1699.34, 2504.08, 44.56, 192.01),
},
sanitizeLocations = {
-- Locations of sanitize job tasks
vector4(1737.62, 2491.48, 45.84, 92.66),
vector4(1728.59, 2497.9, 45.84, 300.26),
vector4(1643.47, 2528.69, 45.56, 117.54),
vector4(1634.71, 2526.4, 45.56, 330.27),
vector4(1645.32, 2536.74, 45.56, 260.43),
},
kitchenLocations = {
-- Locations of kitchen job tasks
vector4(1782.12, 2562.6, 45.62, 16.76),
vector4(1787.13, 2561.31, 45.62, 189.48),
vector4(1786.94, 2567.67, 45.62, 3.09),
vector4(1781.15, 2567.55, 45.62, 26.64),
vector4(1776.92, 2565.63, 45.62, 107.5),
},
}
----------------------------------------------------------------------------
-- LOOT TABLES
--
-- Determine items and chances for performing job or gang related tasks
----------------------------------------------------------------------------
Config.loot = {
electricalJobLoot = {
{item = 'stamp', chance = 20},
},
garbageJobLoot = {
{item = 'rotten_fruit', chance = 20},
{item = 'stamp', chance = 10},
},
sanitizeJobLoot = {
{item = 'stamp', chance = 20},
},
kitchenJobLoot = {
{item = 'paper_bag', chance = 20},
{item = 'stamp', chance = 10},
},
cleaningJobLoot = {
{item = 'empty_bottle', chance = 20},
{item = 'stamp', chance = 10},
},
beatdownTaskLoot = {
{item = 'weapon_knife', chance = 3},
{item = 'stamp', chance = 15},
},
bribeTaskLoot = {},
bedsTaskLoot = {
{item = 'broken_cig', chance = 20},
{item = 'stamp', chance = 10},
},
prunoTaskLoot = {},
lockersTaskLoot = {
{item = 'broken_cig', chance = 20},
{item = 'stamp', chance = 10},
},
}
----------------------------------------------------------------------------
-- CUSTOMIZABLE FUNCTION
--
-- This function is called when a player completes a prison job
-- Use this function if you wish to lower a players jail time for doing work
-- Your jailing system may have a custom event you can call
----------------------------------------------------------------------------
if not IsDuplicityVersion() then
function performOnJobCompletion()
-- Content executed when player completes a prison job
print('Completed a job')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment