diff --git a/config.lua b/config.lua index 43de9d5..6941fe4 100644 --- a/config.lua +++ b/config.lua @@ -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.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.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.MaxWeight = 120000 -- Max weight a player can carry (currently 120kg, written in grams) diff --git a/html/css/drawtext.css b/html/css/drawtext.css index 489e967..d4769a6 100644 --- a/html/css/drawtext.css +++ b/html/css/drawtext.css @@ -25,6 +25,20 @@ 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 { background: var(--active-bg); } diff --git a/html/css/style.css b/html/css/style.css index 4581314..5842d7a 100644 --- a/html/css/style.css +++ b/html/css/style.css @@ -2,6 +2,49 @@ html::-webkit-scrollbar { 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 { background-color: rgba(23, 23, 23, 90%); border-radius: 10px; diff --git a/locale/ee.lua b/locale/ee.lua new file mode 100644 index 0000000..8bd5da0 --- /dev/null +++ b/locale/ee.lua @@ -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 +}) diff --git a/server/commands.lua b/server/commands.lua index e9aacf0..fdcf590 100644 --- a/server/commands.lua +++ b/server/commands.lua @@ -208,7 +208,7 @@ end, 'admin') -- Inventory (should be in qb-inventory?) 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)) if Player then Player.Functions.ClearInventory() diff --git a/server/events.lua b/server/events.lua index 3b2ceab..999264a 100644 --- a/server/events.lua +++ b/server/events.lua @@ -204,6 +204,7 @@ end) QBCore.Functions.CreateCallback('QBCore:HasItem', function(source, cb, items, amount) local retval = false + if items == nil then return cb(true) end local Player = QBCore.Functions.GetPlayer(source) if not Player then return cb(false) end local isTable = type(items) == 'table' diff --git a/server/player.lua b/server/player.lua index 57fbd6b..ec6aedb 100644 --- a/server/player.lua +++ b/server/player.lua @@ -82,7 +82,7 @@ function QBCore.Player.CheckPlayerData(source, PlayerData) PlayerData.charinfo.gender = PlayerData.charinfo.gender or 0 PlayerData.charinfo.backstory = PlayerData.charinfo.backstory or 'placeholder backstory' 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() -- Metadata PlayerData.metadata = PlayerData.metadata or {} @@ -139,6 +139,7 @@ function QBCore.Player.CheckPlayerData(source, PlayerData) PlayerData.job.name = PlayerData.job.name or 'unemployed' PlayerData.job.label = PlayerData.job.label or 'Civilian' 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 PlayerData.job.onduty = QBCore.Shared.Jobs[PlayerData.job.name].defaultDuty end @@ -195,6 +196,7 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline) self.PlayerData.job.name = job self.PlayerData.job.label = QBCore.Shared.Jobs[job].label 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 local jobgrade = QBCore.Shared.Jobs[job].grades[grade] self.PlayerData.job.grade = {} @@ -767,7 +769,7 @@ function QBCore.Functions.CreatePhoneNumber() local UniqueFound = false local PhoneNumber = nil 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 result = MySQL.prepare.await('SELECT COUNT(*) as count FROM players WHERE charinfo LIKE ?', { query }) if result == 0 then diff --git a/shared/jobs.lua b/shared/jobs.lua index 8960e67..a1da2bb 100644 --- a/shared/jobs.lua +++ b/shared/jobs.lua @@ -14,6 +14,7 @@ QBShared.Jobs = { }, ['police'] = { label = 'Law Enforcement', + type = "leo", defaultDuty = true, offDutyPay = false, grades = { @@ -279,4 +280,4 @@ QBShared.Jobs = { }, }, }, -} \ No newline at end of file +}