Skip to content

Commit

Permalink
refactor(server/commands): use chat export instead (#599)
Browse files Browse the repository at this point in the history
  • Loading branch information
mafewtm authored Oct 21, 2024
1 parent d029fab commit 372ad6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -342,20 +342,20 @@ lib.addCommand('ooc', {
local playerCoords = GetEntityCoords(GetPlayerPed(source))
for _, v in pairs(players) do
if v == source then
TriggerClientEvent('chat:addMessage', v --[[@as Source]], {
exports.chat:addMessage(v --[[@as Source]], {
color = { 0, 0, 255},
multiline = true,
args = {('OOC | %s'):format(GetPlayerName(source)), message}
})
elseif #(playerCoords - GetEntityCoords(GetPlayerPed(v))) < 20.0 then
TriggerClientEvent('chat:addMessage', v --[[@as Source]], {
exports.chat:addMessage(v --[[@as Source]], {
color = { 0, 0, 255},
multiline = true,
args = {('OOC | %s'):format(GetPlayerName(source)), message}
})
elseif IsPlayerAceAllowed(v --[[@as string]], 'admin') then
if IsOptin(v --[[@as Source]]) then
TriggerClientEvent('chat:addMessage', v --[[@as Source]], {
exports.chat:addMessage(v--[[@as Source]], {
color = { 0, 0, 255},
multiline = true,
args = {('Proximity OOC | %s'):format(GetPlayerName(source)), message}
Expand Down

0 comments on commit 372ad6d

Please sign in to comment.