Skip to content

Commit

Permalink
that works at least
Browse files Browse the repository at this point in the history
  • Loading branch information
TonybynMp4 committed May 9, 2023
1 parent e81d8e2 commit 6cf9cca
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions server/events.lua
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,13 @@ RegisterNetEvent('QBCore:CallCommand', function(command, args)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
if not Player then return end
local chatargs = {args = {'/'..command }}
for _,v in pairs(args) do
chatargs.args[#chatargs+1] = v
local newargs = command
if args then
for _, v in pairs(args) do
newargs = newargs .. ' ' .. v
end
end
TriggerClientEvent('chat:addMessage', src, chatargs)
TriggerClientEvent('QBCore:Client:CallCommand', src, newargs)
end)

-- Use this for player vehicle spawning
Expand Down

0 comments on commit 6cf9cca

Please sign in to comment.