Skip to content

Commit

Permalink
Fix for Project-Sloth#1
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeSzymkowicz committed Apr 20, 2022
1 parent 8c3c917 commit 358c65d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,14 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb
if Config.PoliceJobs[JobName] then
local convictions = GetConvictions({person.cid})
person.convictions = {}
local convCount = 1
if next(convictions) then
for _, conv in pairs(convictions) do
if conv.warrant then person.warrant = true end
local charges = json.decode(conv.charges)
for _, charge in pairs(charges) do
person.convictions[_] = charge
person.convictions[convCount] = charge
convCount = convCount + 1
end
end
end
Expand Down

0 comments on commit 358c65d

Please sign in to comment.