ESX
Dependencies
Installlation
Config File
--Framework settings
ESX = exports["es_extended"]:getSharedObject()
Ylean = {}
Ylean.Debug = false
Ylean.Locales = "en"
Ylean.TargetResource = 'ox_target' -- 'ox_target' support available (you can try other if there is the same syntax as ox_target it should work)
-- Framework events
Ylean.NotifyEvent = 'esx:showNotification' --Client side only event
Ylean.JobUpdateEvent = 'esx:setJob' --Client side only event
Ylean.OnPlayerLoadedEvent = 'esx:playerLoaded' --Client side only event
Ylean.SocietyAccountEvent = 'esx_addonaccount:getSharedAccount' -- server side event
Ylean.OpenClothingMenu = 'esx_skin:openSaveableMenu' -- Boss menu clothing menu [client sided event]
Ylean.DefaultDuty = true -- if set to 'true', player will be on duty after loading in to server
-- GENERAL SETTINGS
Ylean.General = {
blip = {
active = true,
coords = vector4(233.67, 221.3, 113.86, 338.37),
type = 409, -- https://docs.fivem.net/docs/game-references/blips/
text = "Viva Capital",
color = 2 -- https://docs.fivem.net/docs/game-references/blips/#blip-colors
},
floatingEmblem = {
active = true,
coords = { vector3(233.67, 221.3, 113.00), vector3(246.81, 209.6, 113.00), vector3(241.21, 211.66, 113.00)},
type = 29, -- Marker type: https://docs.fivem.net/docs/game-references/markers/
color = {0, 255, 0, 255}, -- RGBA: green color
waveEnabled = true, -- Enable or disable waving
waveAmplitude = 0.2, -- Amplitude of the wave (height of the oscillation)
waveSpeed = 2 -- Speed of the wave
},
ped = {
active = true,
coords = vector4(233.57, 220.39, 109.28, 352.01),
model = "s_m_m_movprem_01", -- https://docs.fivem.net/docs/game-references/ped-models/
animation = {
dict = "amb@world_human_hang_out_street@female_arms_crossed@idle_a", -- Animation dictionary for an idle pose
name = "idle_a", -- Animation name for a relaxed, crossed arms stance
flag = 49 -- Loop the animation, prevent movement
},
waveToPlayer = {
active = true,
distance = 5.0,
animation = {
dict = "gestures@m@standing@casual", -- Animation dictionary
name = "gesture_hello", -- Animation name
flag = 48 -- Prevents movement while waving
}
}
},
menu_open_points = {
debug = false,
coords = { vector3(233.67, 221.3, 111.5), vector3(246.81, 209.6, 111.5), vector3(241.21, 211.66, 111.5)},
accessDistance = 5.0,
icon = "fa-solid fa-right-to-bracket"
}
}
-- JOB SETTINGS
Ylean.BrokerJob = {
name = "financial",
rejectionReasonLength = 200, -- Max. 500 chars
grades = {
['0'] = {
canGrantBusinessLoans = false, -- A variable defining whether an employee with a given rank is allowed to grant business loans
canGrantLoansToPlayers = true, -- A variable defining whether an employee with a given rank is allowed to grant individual loans
individualProfitFromInterest = 30, -- A variable defining the percentage of the interest rate that an employee receives for granting a indiviudal loan
businessProfitFromInterest = 35 -- A variable defining the percentage of the interest rate that an employee receives for granting a business loan
},
['1'] = {
canGrantBusinessLoans = true,
canGrantLoansToPlayers = true,
individualProfitFromInterest = 45,
businessProfitFromInterest = 50
},
['2'] = {
canGrantBusinessLoans = true,
canGrantLoansToPlayers = true,
individualProfitFromInterest = 70,
businessProfitFromInterest = 80
},
},
on_off_duty = {
marker = {
active = true,
coords = vector3(262.98, 209.39, 112.00),
type = 20,
color = {
r = 255,
g = 215,
b = 0,
a = 100
}
},
target = {
active = true,
coords = vector4(262.9, 209.4, 110.29, 346.69),
icon = "fa-solid fa-sign-in-alt",
debugPoly = false,
distance = 2.0
}
},
boss_menu = {
coords = vector4(262.16, 205.88, 109.48, 320.02),
hire_distance = 20.0,
target = {
debug = false,
target_icon = "fas fa-sign-in-alt",
distance = 2.0
}
}
}
-- INDIVIDUAL LOAN SETTINGS
Ylean.IndividualLoan = {
approval = {
active = true, -- If enabled, loans exceeding a certain amount will require mandatory approval from authorized employees
from = 10000000 -- Loans exceeding this amount will require approval from an authorized employee (provided that active = true). If set to "0", every loan will require approval
},
minimumLoanAmount = 1200,
maximumDeadline = 60,
interestRate = {
--[[
If "constant" set to true, regardless of the repayment term chosen by the player, the interest rate will always remain the same (the "value" variable below).
If set to false, the minimum interest rate for a one-day repayment term will be the percentage set in the "min" variable, while the maximum rate
will be the percentage set in the "max" variable below.
]]--
constant = false,
value = 12.5,
min = 5,
max = 15
},
creditScoreGrantedForRepayment = 1,
loanPurposeLength = 150, -- in characters (max. 500)
delay = 15, -- The time that must pass from the full repayment of the loan until the possibility of taking another one. (IN MINUTES)
methodOfGrantingLoan = "bank" -- "bank" or "money"
}
-- INDIVIDUAL LOAN REPAYMENT SETTINGS
Ylean.IndividualLoanRepayment = {
creditScoreLostInCaseOfDelay = 5,
notifyAboutUpcomingRepayment = {
active = true, -- If set to true, the player will be notified about the upcoming installment payment
hours = 30 -- How many hours before the payment due date should the player be notified
},
immediateDeduction = false, -- If true, the loan amount will be immediately deducted from the account once the deadline is passed
interestRate = 0.05, -- Daily interest rate (e.g., 5%)
daysBeforeDeduction = 3 -- Number of days after the deadline before funds are automatically deducted when interest accrues
}
-- BUSINESS LOAN SETTINGS
Ylean.BusinessLoan = {
minimumLoanAmount = 50000,
maximumLoanAmount = 100000,
maximumDeadline = 120,
interestRate = {
--[[
If "constant" set to true, regardless of the repayment term chosen by the player, the interest rate will always remain the same (the "value" variable below).
If set to false, the minimum interest rate for a one-day repayment term will be the percentage set in the "min" variable, while the maximum rate
will be the percentage set in the "max" variable below.
]]--
constant = false,
value = 12.5,
min = 5,
max = 15.5
},
methodOfGrantingLoan = "bank" -- "bank" or "money"
}
-- BUSINESS LOAN REPAYMENT SETTINGS
Ylean.BusinessLoanRepayment = {
notifyAboutUpcomingRepayment = {
active = true, -- If set to true, the player will be notified about the upcoming installment payment
hours = 30 -- How many hours before the payment due date should the player be notified
},
immediateDeduction = true, -- If true, the loan amount will be immediately deducted from the account once the deadline is passed
interestRate = 0.05, -- Daily interest rate (e.g., 5%)
daysBeforeDeduction = 3 -- Number of days after the deadline before funds are automatically deducted when interest accrues
}
-- CREDIT SCORE SETTINGS
Ylean.CreditScore = {
{from = 0, to = 5, max = 5000}, -- Players with a credit score between 0 and 5 can borrow up to 5000
{from = 6, to = 9, max = 10000}, -- Players with a credit score between 6 and 9 can borrow up to 10000 ...
{from = 10, to = 15, max = 15000},
{from = 16, to = 20, max = 20000},
{from = 21, to = 25, max = 35000},
{from = 26, to = 30, max = 50000},
}
Ylean.BossStash = {
id = 'financial_stash',
label = 'Financial Stash',
slots = 50,
weight = 100000,
owner = false,
jobs = 'financial'
}
-- LOCALES INITIALIZE !!DON'T TOUCH!!
function Translate(key)
local languageCode = Ylean.Locales or "en"
local localesTable = _G["Locales_" .. languageCode]
if not localesTable then
localesTable = _G["Locales_en"]
end
return localesTable and localesTable[key] or key
end
function Debug(message)
if Ylean.Debug then
print("[Debug] " .. message)
end
endJob Settings
Configuration Requirements
Boss Menu Access
Interest Rate Settings
1. Fixed Rate Mode (constant = true)
constant = true)
2. Variable Rate Mode (constant = false)
constant = false)
Translation Guide
1. NUI (Front-End) Translations
2. Server (Back-End) Translations
3. Main NUI HTML
Changing the Displayed Currency
Changing the Date Format
Upcoming Repayment Notification Mechanism
Immediate Deduction Mode
Interest Accrual Mode
Comparison of Modes
Feature
Immediate Deduction
Interest Accrual
Discord Webhook Logging
Event
Description
Last updated