Skip to content

Commit

Permalink
improve(compat): qb compatibilty improved with blacklisting (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheiLLeniumStudios authored Feb 1, 2023
1 parent 1f1f37b commit b4f4452
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions client/framework/qb/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ local function getRankInputValues(rankList)
return rankValues
end

local function setClientParams()
client.job = PlayerData.job
client.gang = PlayerData.gang
client.citizenid = PlayerData.citizenid
end

function Framework.GetPlayerGender()
if PlayerData.charinfo.gender == 1 then
return "Female"
Expand All @@ -26,9 +32,7 @@ end

function Framework.UpdatePlayerData()
PlayerData = QBCore.Functions.GetPlayerData()
client.job = PlayerData.job
client.gang = PlayerData.gang
client.citizenid = PlayerData.citizenid
setClientParams()
end

function Framework.HasTracker()
Expand Down Expand Up @@ -85,6 +89,7 @@ end)
RegisterNetEvent("qb-clothes:client:CreateFirstCharacter", function()
QBCore.Functions.GetPlayerData(function(pd)
PlayerData = pd
setClientParams()
InitializeCharacter(Framework.GetGender(true))
end)
end)
Expand Down

0 comments on commit b4f4452

Please sign in to comment.