diff --git a/config.lua b/config.lua index da61617..c3d9a19 100644 --- a/config.lua +++ b/config.lua @@ -29,6 +29,9 @@ 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 +QBConfig.Commands = {} -- Command Configuration +QBConfig.Commands.OOCColor = {255, 151, 133} -- RGB color code for the OOC command + QBConfig.Notify = {} QBConfig.Notify.NotificationStyling = { @@ -61,4 +64,4 @@ QBConfig.Notify.VariantDefinitions = { classes = 'ambulance', icon = 'fas fa-ambulance' } -} +} \ No newline at end of file diff --git a/server/commands.lua b/server/commands.lua index e240da7..499c7c1 100644 --- a/server/commands.lua +++ b/server/commands.lua @@ -244,7 +244,6 @@ QBCore.Commands.Add('setgang', Lang:t("command.setgang.help"), { { name = Lang:t end, 'admin') -- Out of Character Chat - 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 +252,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 = QBConfig.Commands.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 = 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 = { 0, 0, 255}, + color = QBConfig.Commands.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 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)