Add OOC color to main config file

This commit is contained in:
Jellyton
2022-12-28 02:42:00 +00:00
parent 58ab2f6cbd
commit ec628fb6c7
2 changed files with 19 additions and 15 deletions
+3 -6
View File
@@ -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}
})