mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-09-04 16:23:21 +00:00
Merge branch 'main' into patch-1
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ QBConfig.Money = {}
|
|||||||
QBConfig.Money.MoneyTypes = {['cash'] = 500, ['bank'] = 5000, ['crypto'] = 0} -- ['type'] = startamount - Add or remove money types for your server (for ex. ['blackmoney'] = 0), remember once added it will not be removed from the database!
|
QBConfig.Money.MoneyTypes = {['cash'] = 500, ['bank'] = 5000, ['crypto'] = 0} -- ['type'] = startamount - Add or remove money types for your server (for ex. ['blackmoney'] = 0), remember once added it will not be removed from the database!
|
||||||
QBConfig.Money.DontAllowMinus = {'cash', 'crypto'} -- Money that is not allowed going in minus
|
QBConfig.Money.DontAllowMinus = {'cash', 'crypto'} -- Money that is not allowed going in minus
|
||||||
QBConfig.Money.PayCheckTimeOut = 10 -- The time in minutes that it will give the paycheck
|
QBConfig.Money.PayCheckTimeOut = 10 -- The time in minutes that it will give the paycheck
|
||||||
QBConfig.Money.PayCheckSociety = false -- If true paycheck will come from the society account that the player is employed at, requires qb-bossmenu
|
QBConfig.Money.PayCheckSociety = false -- If true paycheck will come from the society account that the player is employed at, requires qb-management
|
||||||
|
|
||||||
QBConfig.Player = {}
|
QBConfig.Player = {}
|
||||||
QBConfig.Player.MaxWeight = 120000 -- Max weight a player can carry (currently 120kg, written in grams)
|
QBConfig.Player.MaxWeight = 120000 -- Max weight a player can carry (currently 120kg, written in grams)
|
||||||
|
|||||||
@@ -25,6 +25,20 @@
|
|||||||
box-shadow: 0rem 0rem 0.1rem 0.05rem #000000;
|
box-shadow: 0rem 0rem 0.1rem 0.05rem #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (width: 3840px) and (height: 2160px) {
|
||||||
|
#drawtext-container {
|
||||||
|
display: none;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
font-family: "Poppins", sans-serif !important;
|
||||||
|
font-weight: 300;
|
||||||
|
font-size: 1.5vh;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.text.pressed {
|
.text.pressed {
|
||||||
background: var(--active-bg);
|
background: var(--active-bg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,49 @@ html::-webkit-scrollbar {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (width: 3840px) and (height: 2160px) {
|
||||||
|
.success {
|
||||||
|
background-color: rgba(23, 23, 23, 90%);
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0rem 0rem 0.1rem 0.05rem #000000;
|
||||||
|
border-left: 0.5rem solid #20bb44;
|
||||||
|
font-size: 1.5vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.primary {
|
||||||
|
background-color: rgba(23, 23, 23, 90%);
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0rem 0rem 0.1rem 0.05rem #000000;
|
||||||
|
border-left: 5px solid #1c75d2;
|
||||||
|
font-size: 1.5vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
background-color: rgba(23, 23, 23, 90%);
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0rem 0rem 0.1rem 0.05rem #000000;
|
||||||
|
border-left: 5px solid #c10114;
|
||||||
|
font-size: 1.5vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.police {
|
||||||
|
background-color: rgba(23, 23, 23, 90%);
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0rem 0rem 0.1rem 0.05rem #000000;
|
||||||
|
border-left: 5px solid #2197f2;
|
||||||
|
font-size: 1.5vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ambulance {
|
||||||
|
background-color: rgba(23, 23, 23, 90%);
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0rem 0rem 0.1rem 0.05rem #000000;
|
||||||
|
border-left: 5px solid #f44236;
|
||||||
|
font-size: 1.5vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
.success {
|
.success {
|
||||||
background-color: rgba(23, 23, 23, 90%);
|
background-color: rgba(23, 23, 23, 90%);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
local Translations = {
|
||||||
|
error = {
|
||||||
|
not_online = 'Mängija pole serveris!',
|
||||||
|
wrong_format = 'Vale formaat.',
|
||||||
|
missing_args = 'Kõiki argumente pole sisestatud (x, y, z)',
|
||||||
|
missing_args2 = 'Kõik argumendid tuleb täita!',
|
||||||
|
no_access = 'Sellele käsule pole juurdepääsu!',
|
||||||
|
company_too_poor = 'Teie tööandja on pankrotis.',
|
||||||
|
item_not_exist = 'Sellist asja ei eksisteeri',
|
||||||
|
too_heavy = 'Inventuur on liiga täis',
|
||||||
|
duplicate_license = 'Leiti Rockstari litsentsi duplikaat',
|
||||||
|
no_valid_license = 'Kehtivat Rockstari litsentsi ei leitud',
|
||||||
|
not_whitelisted = 'Te\'pole serveri Allowlistis!'
|
||||||
|
},
|
||||||
|
success = {},
|
||||||
|
info = {
|
||||||
|
received_paycheck = 'Saite oma töötasu kätte $%{value}',
|
||||||
|
job_info = 'Töökoht: %{value} | Auaste: %{value2} | Tööl: %{value3}',
|
||||||
|
gang_info = 'Gang: %{value} | Auaste: %{value2}',
|
||||||
|
on_duty = 'Alustasite enda tööpäeva!',
|
||||||
|
off_duty = 'Lõpetasite enda tööpäeva!',
|
||||||
|
checking_ban = 'Tere %s. Me kontrollime, kas olete keelustatud.',
|
||||||
|
join_server = 'Tere tulemast %s serverisse {Server Name}.',
|
||||||
|
checking_whitelisted = 'Tere %s. Kontrollime teie Allowlisti olemasolu.'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Lang = Locale:new({
|
||||||
|
phrases = Translations,
|
||||||
|
warnOnMissing = true
|
||||||
|
})
|
||||||
+1
-1
@@ -208,7 +208,7 @@ end, 'admin')
|
|||||||
-- Inventory (should be in qb-inventory?)
|
-- Inventory (should be in qb-inventory?)
|
||||||
|
|
||||||
QBCore.Commands.Add('clearinv', 'Clear Players Inventory (Admin Only)', { { name = 'id', help = 'Player ID' } }, false, function(source, args)
|
QBCore.Commands.Add('clearinv', 'Clear Players Inventory (Admin Only)', { { name = 'id', help = 'Player ID' } }, false, function(source, args)
|
||||||
local playerId = args[1] and args[1] ~= '' or source
|
local playerId = args[1] ~= '' and args[1] or source
|
||||||
local Player = QBCore.Functions.GetPlayer(tonumber(playerId))
|
local Player = QBCore.Functions.GetPlayer(tonumber(playerId))
|
||||||
if Player then
|
if Player then
|
||||||
Player.Functions.ClearInventory()
|
Player.Functions.ClearInventory()
|
||||||
|
|||||||
@@ -204,6 +204,7 @@ end)
|
|||||||
|
|
||||||
QBCore.Functions.CreateCallback('QBCore:HasItem', function(source, cb, items, amount)
|
QBCore.Functions.CreateCallback('QBCore:HasItem', function(source, cb, items, amount)
|
||||||
local retval = false
|
local retval = false
|
||||||
|
if items == nil then return cb(true) end
|
||||||
local Player = QBCore.Functions.GetPlayer(source)
|
local Player = QBCore.Functions.GetPlayer(source)
|
||||||
if not Player then return cb(false) end
|
if not Player then return cb(false) end
|
||||||
local isTable = type(items) == 'table'
|
local isTable = type(items) == 'table'
|
||||||
|
|||||||
+4
-2
@@ -56,7 +56,7 @@ function QBCore.Player.CheckPlayerData(source, PlayerData)
|
|||||||
PlayerData.charinfo.gender = PlayerData.charinfo.gender or 0
|
PlayerData.charinfo.gender = PlayerData.charinfo.gender or 0
|
||||||
PlayerData.charinfo.backstory = PlayerData.charinfo.backstory or 'placeholder backstory'
|
PlayerData.charinfo.backstory = PlayerData.charinfo.backstory or 'placeholder backstory'
|
||||||
PlayerData.charinfo.nationality = PlayerData.charinfo.nationality or 'USA'
|
PlayerData.charinfo.nationality = PlayerData.charinfo.nationality or 'USA'
|
||||||
PlayerData.charinfo.phone = PlayerData.charinfo.phone or QBCore.Functions.CreatePhoneNumber()
|
PlayerData.charinfo.phone = tonumber(PlayerData.charinfo.phone) or QBCore.Functions.CreatePhoneNumber()
|
||||||
PlayerData.charinfo.account = PlayerData.charinfo.account or QBCore.Functions.CreateAccountNumber()
|
PlayerData.charinfo.account = PlayerData.charinfo.account or QBCore.Functions.CreateAccountNumber()
|
||||||
-- Metadata
|
-- Metadata
|
||||||
PlayerData.metadata = PlayerData.metadata or {}
|
PlayerData.metadata = PlayerData.metadata or {}
|
||||||
@@ -113,6 +113,7 @@ function QBCore.Player.CheckPlayerData(source, PlayerData)
|
|||||||
PlayerData.job.name = PlayerData.job.name or 'unemployed'
|
PlayerData.job.name = PlayerData.job.name or 'unemployed'
|
||||||
PlayerData.job.label = PlayerData.job.label or 'Civilian'
|
PlayerData.job.label = PlayerData.job.label or 'Civilian'
|
||||||
PlayerData.job.payment = PlayerData.job.payment or 10
|
PlayerData.job.payment = PlayerData.job.payment or 10
|
||||||
|
PlayerData.job.type = PlayerData.job.type or 'none'
|
||||||
if QBCore.Shared.ForceJobDefaultDutyAtLogin or PlayerData.job.onduty == nil then
|
if QBCore.Shared.ForceJobDefaultDutyAtLogin or PlayerData.job.onduty == nil then
|
||||||
PlayerData.job.onduty = QBCore.Shared.Jobs[PlayerData.job.name].defaultDuty
|
PlayerData.job.onduty = QBCore.Shared.Jobs[PlayerData.job.name].defaultDuty
|
||||||
end
|
end
|
||||||
@@ -167,6 +168,7 @@ function QBCore.Player.CreatePlayer(PlayerData)
|
|||||||
self.PlayerData.job.name = job
|
self.PlayerData.job.name = job
|
||||||
self.PlayerData.job.label = QBCore.Shared.Jobs[job].label
|
self.PlayerData.job.label = QBCore.Shared.Jobs[job].label
|
||||||
self.PlayerData.job.onduty = QBCore.Shared.Jobs[job].defaultDuty
|
self.PlayerData.job.onduty = QBCore.Shared.Jobs[job].defaultDuty
|
||||||
|
self.PlayerData.job.type = QBCore.Shared.Jobs[job].type or 'none'
|
||||||
if QBCore.Shared.Jobs[job].grades[grade] then
|
if QBCore.Shared.Jobs[job].grades[grade] then
|
||||||
local jobgrade = QBCore.Shared.Jobs[job].grades[grade]
|
local jobgrade = QBCore.Shared.Jobs[job].grades[grade]
|
||||||
self.PlayerData.job.grade = {}
|
self.PlayerData.job.grade = {}
|
||||||
@@ -634,7 +636,7 @@ function QBCore.Functions.CreatePhoneNumber()
|
|||||||
local UniqueFound = false
|
local UniqueFound = false
|
||||||
local PhoneNumber = nil
|
local PhoneNumber = nil
|
||||||
while not UniqueFound do
|
while not UniqueFound do
|
||||||
PhoneNumber = math.random(100,999) .. math.random(1000000,9999999)
|
PhoneNumber = tonumber(math.random(100,999) .. math.random(1000000,9999999))
|
||||||
local query = '%' .. PhoneNumber .. '%'
|
local query = '%' .. PhoneNumber .. '%'
|
||||||
local result = MySQL.prepare.await('SELECT COUNT(*) as count FROM players WHERE charinfo LIKE ?', { query })
|
local result = MySQL.prepare.await('SELECT COUNT(*) as count FROM players WHERE charinfo LIKE ?', { query })
|
||||||
if result == 0 then
|
if result == 0 then
|
||||||
|
|||||||
+2
-1
@@ -14,6 +14,7 @@ QBShared.Jobs = {
|
|||||||
},
|
},
|
||||||
['police'] = {
|
['police'] = {
|
||||||
label = 'Law Enforcement',
|
label = 'Law Enforcement',
|
||||||
|
type = "leo",
|
||||||
defaultDuty = true,
|
defaultDuty = true,
|
||||||
offDutyPay = false,
|
offDutyPay = false,
|
||||||
grades = {
|
grades = {
|
||||||
@@ -279,4 +280,4 @@ QBShared.Jobs = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user