Merge pull request #907 from jellyton69:develop

Fix Debug, Fix Spelling Mistake, Add OOC Color Config
This commit is contained in:
Kakarot
2023-04-27 17:14:07 -07:00
committed by GitHub
3 changed files with 10 additions and 9 deletions
+4 -1
View File
@@ -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'
}
}
}
+4 -5
View File
@@ -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
+2 -3
View File
@@ -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)