Skip to content

Commit

Permalink
Optional image in discord embed
Browse files Browse the repository at this point in the history
  • Loading branch information
GhzGarage committed Apr 20, 2024
1 parent e97c159 commit d06d5c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions client/recoil.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ local recoils = {
[`weapon_rayminigun`] = 0.3,
}

AddEventHandler("CEventGunShot", function (entities, eventEntity, args)
AddEventHandler('CEventGunShot', function(entities, eventEntity, args)
local ped = PlayerPedId()

if eventEntity ~= ped then return end
if IsPedDoingDriveby(ped) then return end

local _, weap = GetCurrentPedWeapon(ped)
if recoils[weap] and recoils[weap] ~= 0 then
local tv = 0
Expand All @@ -116,4 +116,4 @@ AddEventHandler("CEventGunShot", function (entities, eventEntity, args)
until tv >= recoils[weap]
end
end
end)
end)
3 changes: 2 additions & 1 deletion server/logs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ local colors = { -- https://www.spycolor.com/

local logQueue = {}

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

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

Expand Down

0 comments on commit d06d5c1

Please sign in to comment.