From b76160ca1e4262497e83f3e3b036a71d49ad47f6 Mon Sep 17 00:00:00 2001 From: Jellyton Date: Tue, 27 Dec 2022 07:40:53 +0000 Subject: [PATCH 1/5] Fix proximity OOC spelling --- server/commands.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/server/commands.lua b/server/commands.lua index e240da7..641ce1f 100644 --- a/server/commands.lua +++ b/server/commands.lua @@ -245,6 +245,8 @@ end, 'admin') -- Out of Character Chat +local oocColor = {255, 151, 133} + QBCore.Commands.Add('ooc', Lang:t("command.ooc.help"), {}, false, function(source, args) local message = table.concat(args, ' ') local Players = QBCore.Functions.GetPlayers() @@ -253,22 +255,22 @@ QBCore.Commands.Add('ooc', Lang:t("command.ooc.help"), {}, false, function(sourc for _, v in pairs(Players) do if v == source then TriggerClientEvent('chat:addMessage', v, { - color = { 0, 0, 255}, + color = oocColor, multiline = true, args = {'OOC | '.. GetPlayerName(source), message} }) elseif #(playerCoords - GetEntityCoords(GetPlayerPed(v))) < 20.0 then TriggerClientEvent('chat:addMessage', v, { - color = { 0, 0, 255}, + color = oocColor, multiline = true, args = {'OOC | '.. GetPlayerName(source), message} }) elseif QBCore.Functions.HasPermission(v, 'admin') then if QBCore.Functions.IsOptin(v) then TriggerClientEvent('chat:addMessage', v, { - color = { 0, 0, 255}, + color = oocColor, multiline = true, - args = {'Proxmity OOC | '.. GetPlayerName(source), message} + args = {'Proximity OOC | '.. GetPlayerName(source), message} }) TriggerEvent('qb-log:server:CreateLog', 'ooc', 'OOC', 'white', '**' .. GetPlayerName(source) .. '** (CitizenID: ' .. Player.PlayerData.citizenid .. ' | ID: ' .. source .. ') **Message:** ' .. message, false) end @@ -290,6 +292,7 @@ QBCore.Commands.Add('me', Lang:t("command.me.help"), {{name = Lang:t("command.me local tCoords = GetEntityCoords(target) if target == ped or #(pCoords - tCoords) < 20 then TriggerClientEvent('QBCore:Command:ShowMe3D', Player, source, msg) + TriggerEvent('rcore_cam:me', source, msg) end end end, 'user') From 58ab2f6cbdc9c73b98df01bea15c9609646f1375 Mon Sep 17 00:00:00 2001 From: Jellyton Date: Wed, 28 Dec 2022 02:39:18 +0000 Subject: [PATCH 2/5] Fix QBCore.Debug not printing correct invoking resource name --- server/debug.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/debug.lua b/server/debug.lua index ecfba64..056c1ff 100644 --- a/server/debug.lua +++ b/server/debug.lua @@ -25,15 +25,14 @@ local function tPrint(tbl, indent) end end -RegisterServerEvent('QBCore:DebugSomething', function(tbl, indent) - local resource = GetInvokingResource() or "qb-core" +RegisterServerEvent('QBCore:DebugSomething', function(tbl, indent, resource) print(('\x1b[4m\x1b[36m[ %s : DEBUG]\x1b[0m'):format(resource)) tPrint(tbl, indent) print('\x1b[4m\x1b[36m[ END DEBUG ]\x1b[0m') end) function QBCore.Debug(tbl, indent) - TriggerEvent('QBCore:DebugSomething', tbl, indent) + TriggerEvent('QBCore:DebugSomething', tbl, indent, GetInvokingResource() or "qb-core") end function QBCore.ShowError(resource, msg) From ec628fb6c7af9a0e40a4356ecfca3edda853eea5 Mon Sep 17 00:00:00 2001 From: Jellyton Date: Wed, 28 Dec 2022 02:42:00 +0000 Subject: [PATCH 3/5] Add OOC color to main config file --- config.lua | 25 ++++++++++++++++--------- server/commands.lua | 9 +++------ 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/config.lua b/config.lua index da61617..c5a4d8a 100644 --- a/config.lua +++ b/config.lua @@ -1,19 +1,19 @@ QBConfig = {} -QBConfig.MaxPlayers = GetConvarInt('sv_maxclients', 48) -- Gets max players from config file, default 48 +QBConfig.MaxPlayers = GetConvarInt('sv_maxclients', 128) -- Gets max players from config file, default 48 QBConfig.DefaultSpawn = vector4(-1035.71, -2731.87, 12.86, 0.0) QBConfig.UpdateInterval = 5 -- how often to update player data in minutes QBConfig.StatusInterval = 5000 -- how often to check hunger/thirst status in milliseconds 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-management +QBConfig.Money.MoneyTypes = { cash = 1000, bank = 40000, shung = 0, rook = 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', 'bank', 'crypto' } -- Money that is not allowed going in minus +QBConfig.Money.PayCheckTimeOut = 45 -- The time in minutes that it will give the paycheck +QBConfig.Money.PayCheckSociety = true -- If true paycheck will come from the society account that the player is employed at, requires qb-management QBConfig.Player = {} -QBConfig.Player.HungerRate = 4.2 -- Rate at which hunger goes down. -QBConfig.Player.ThirstRate = 3.8 -- Rate at which thirst goes down. +QBConfig.Player.HungerRate = 3.0 -- Rate at which hunger goes down. +QBConfig.Player.ThirstRate = 2.8 -- Rate at which thirst goes down. QBConfig.Player.Bloodtypes = { "A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-", } @@ -25,14 +25,17 @@ QBConfig.Server.Uptime = 0 -- Time the server has been up. QBConfig.Server.Whitelist = false -- Enable or disable whitelist on the server QBConfig.Server.WhitelistPermission = 'admin' -- Permission that's able to enter the server when the whitelist is on QBConfig.Server.PVP = true -- Enable or disable pvp on the server (Ability to shoot other players) -QBConfig.Server.Discord = "" -- Discord invite link +QBConfig.Server.Discord = "discord.gg/everfall" -- Discord invite link QBConfig.Server.CheckDuplicateLicense = true -- Check for duplicate rockstar license on join QBConfig.Server.Permissions = { 'god', 'admin', 'mod' } -- Add as many groups as you want here after creating them in your server.cfg +QBConfig.Commands = {} -- Command Configuration +QBConfig.Commands.OOCColor = {255, 151, 133} -- RGB color code for the OOC command + QBConfig.Notify = {} QBConfig.Notify.NotificationStyling = { - group = false, -- Allow notifications to stack with a badge instead of repeating + group = true, -- Allow notifications to stack with a badge instead of repeating position = "right", -- top-left | top-right | bottom-left | bottom-right | top | bottom | left | right | center progress = true -- Display Progress Bar } @@ -60,5 +63,9 @@ QBConfig.Notify.VariantDefinitions = { ambulance = { classes = 'ambulance', icon = 'fas fa-ambulance' + }, + panic = { + classes = 'panic', + icon = 'crisis_alert' } } diff --git a/server/commands.lua b/server/commands.lua index 641ce1f..67ff784 100644 --- a/server/commands.lua +++ b/server/commands.lua @@ -244,9 +244,6 @@ QBCore.Commands.Add('setgang', Lang:t("command.setgang.help"), { { name = Lang:t end, 'admin') -- Out of Character Chat - -local oocColor = {255, 151, 133} - QBCore.Commands.Add('ooc', Lang:t("command.ooc.help"), {}, false, function(source, args) local message = table.concat(args, ' ') local Players = QBCore.Functions.GetPlayers() @@ -255,20 +252,20 @@ QBCore.Commands.Add('ooc', Lang:t("command.ooc.help"), {}, false, function(sourc for _, v in pairs(Players) do if v == source then TriggerClientEvent('chat:addMessage', v, { - color = oocColor, + color = QBConfig.Commands.OOCColor, multiline = true, args = {'OOC | '.. GetPlayerName(source), message} }) elseif #(playerCoords - GetEntityCoords(GetPlayerPed(v))) < 20.0 then TriggerClientEvent('chat:addMessage', v, { - color = oocColor, + color = QBConfig.Commands.OOCColor, multiline = true, args = {'OOC | '.. GetPlayerName(source), message} }) elseif QBCore.Functions.HasPermission(v, 'admin') then if QBCore.Functions.IsOptin(v) then TriggerClientEvent('chat:addMessage', v, { - color = oocColor, + color = QBConfig.Commands.OOCColor, multiline = true, args = {'Proximity OOC | '.. GetPlayerName(source), message} }) From c1159dd9ffdddca8cb6dc5a7cf7e61ab4d632c33 Mon Sep 17 00:00:00 2001 From: Jellyton Date: Tue, 27 Dec 2022 18:46:09 -0800 Subject: [PATCH 4/5] Update config --- config.lua | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/config.lua b/config.lua index c5a4d8a..c3d9a19 100644 --- a/config.lua +++ b/config.lua @@ -1,19 +1,19 @@ QBConfig = {} -QBConfig.MaxPlayers = GetConvarInt('sv_maxclients', 128) -- Gets max players from config file, default 48 +QBConfig.MaxPlayers = GetConvarInt('sv_maxclients', 48) -- Gets max players from config file, default 48 QBConfig.DefaultSpawn = vector4(-1035.71, -2731.87, 12.86, 0.0) QBConfig.UpdateInterval = 5 -- how often to update player data in minutes QBConfig.StatusInterval = 5000 -- how often to check hunger/thirst status in milliseconds QBConfig.Money = {} -QBConfig.Money.MoneyTypes = { cash = 1000, bank = 40000, shung = 0, rook = 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', 'bank', 'crypto' } -- Money that is not allowed going in minus -QBConfig.Money.PayCheckTimeOut = 45 -- The time in minutes that it will give the paycheck -QBConfig.Money.PayCheckSociety = true -- If true paycheck will come from the society account that the player is employed at, requires qb-management +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-management QBConfig.Player = {} -QBConfig.Player.HungerRate = 3.0 -- Rate at which hunger goes down. -QBConfig.Player.ThirstRate = 2.8 -- Rate at which thirst goes down. +QBConfig.Player.HungerRate = 4.2 -- Rate at which hunger goes down. +QBConfig.Player.ThirstRate = 3.8 -- Rate at which thirst goes down. QBConfig.Player.Bloodtypes = { "A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-", } @@ -25,7 +25,7 @@ QBConfig.Server.Uptime = 0 -- Time the server has been up. QBConfig.Server.Whitelist = false -- Enable or disable whitelist on the server QBConfig.Server.WhitelistPermission = 'admin' -- Permission that's able to enter the server when the whitelist is on QBConfig.Server.PVP = true -- Enable or disable pvp on the server (Ability to shoot other players) -QBConfig.Server.Discord = "discord.gg/everfall" -- Discord invite link +QBConfig.Server.Discord = "" -- Discord invite link QBConfig.Server.CheckDuplicateLicense = true -- Check for duplicate rockstar license on join QBConfig.Server.Permissions = { 'god', 'admin', 'mod' } -- Add as many groups as you want here after creating them in your server.cfg @@ -35,7 +35,7 @@ QBConfig.Commands.OOCColor = {255, 151, 133} -- RGB color code for the OOC comma QBConfig.Notify = {} QBConfig.Notify.NotificationStyling = { - group = true, -- Allow notifications to stack with a badge instead of repeating + group = false, -- Allow notifications to stack with a badge instead of repeating position = "right", -- top-left | top-right | bottom-left | bottom-right | top | bottom | left | right | center progress = true -- Display Progress Bar } @@ -63,9 +63,5 @@ QBConfig.Notify.VariantDefinitions = { ambulance = { classes = 'ambulance', icon = 'fas fa-ambulance' - }, - panic = { - classes = 'panic', - icon = 'crisis_alert' } -} +} \ No newline at end of file From 56a44bea37ca0d288341dbf9158d2498a159da8f Mon Sep 17 00:00:00 2001 From: Jellyton Date: Tue, 27 Dec 2022 18:46:47 -0800 Subject: [PATCH 5/5] Update commands.lua --- server/commands.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/server/commands.lua b/server/commands.lua index 67ff784..499c7c1 100644 --- a/server/commands.lua +++ b/server/commands.lua @@ -289,7 +289,6 @@ QBCore.Commands.Add('me', Lang:t("command.me.help"), {{name = Lang:t("command.me local tCoords = GetEntityCoords(target) if target == ped or #(pCoords - tCoords) < 20 then TriggerClientEvent('QBCore:Command:ShowMe3D', Player, source, msg) - TriggerEvent('rcore_cam:me', source, msg) end end end, 'user')