mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 02:01:33 +00:00
Add OOC color to main config file
This commit is contained in:
+3
-6
@@ -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}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user