Skip to content

Commit d06d5c1

Browse files
committed
Optional image in discord embed
1 parent e97c159 commit d06d5c1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

client/recoil.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ local recoils = {
8686
[`weapon_rayminigun`] = 0.3,
8787
}
8888

89-
AddEventHandler("CEventGunShot", function (entities, eventEntity, args)
89+
AddEventHandler('CEventGunShot', function(entities, eventEntity, args)
9090
local ped = PlayerPedId()
9191

9292
if eventEntity ~= ped then return end
9393
if IsPedDoingDriveby(ped) then return end
94-
94+
9595
local _, weap = GetCurrentPedWeapon(ped)
9696
if recoils[weap] and recoils[weap] ~= 0 then
9797
local tv = 0
@@ -116,4 +116,4 @@ AddEventHandler("CEventGunShot", function (entities, eventEntity, args)
116116
until tv >= recoils[weap]
117117
end
118118
end
119-
end)
119+
end)

server/logs.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ local colors = { -- https://www.spycolor.com/
5656

5757
local logQueue = {}
5858

59-
RegisterNetEvent('qb-log:server:CreateLog', function(name, title, color, message, tagEveryone)
59+
RegisterNetEvent('qb-log:server:CreateLog', function(name, title, color, message, tagEveryone, imageUrl)
6060
local postData = {}
6161
local tag = tagEveryone or false
6262

@@ -78,6 +78,7 @@ RegisterNetEvent('qb-log:server:CreateLog', function(name, title, color, message
7878
['name'] = 'QBCore Logs',
7979
['icon_url'] = 'https://raw.githubusercontent.com/GhzGarage/qb-media-kit/main/Display%20Pictures/Logo%20-%20Display%20Picture%20-%20Stylized%20-%20Red.png',
8080
},
81+
['image'] = imageUrl and imageUrl ~= '' and { ['url'] = imageUrl } or nil,
8182
}
8283
}
8384

0 commit comments

Comments
 (0)