mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:01:24 +00:00
Fix proximity OOC spelling
This commit is contained in:
+7
-4
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user