Skip to content

Commit

Permalink
fix(cache/ped): Wait 150ms instead of setting ped cache manually
Browse files Browse the repository at this point in the history
  • Loading branch information
TheiLLeniumStudios committed Apr 20, 2023
1 parent 7672b76 commit 5083e4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/framework/qb/migrate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RegisterNetEvent("illenium-appearance:client:migration:load-qb-clothing-skin", f
Citizen.CreateThread(function()
lib.requestModel(model, 1000)
SetPlayerModel(cache.playerId, model)
cache:set("ped", PlayerPedId())
Wait(150)
SetPedComponentVariation(cache.ped, 0, 0, 0, 2)
TriggerEvent("illenium-appearance:client:migration:load-qb-clothing-clothes", playerSkin, cache.ped)
SetModelAsNoLongerNeeded(model)
Expand Down
2 changes: 1 addition & 1 deletion game/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ local function setPlayerModel(model)
while not HasModelLoaded(model) do Wait(0) end

SetPlayerModel(cache.playerId, model)
cache:set("ped", PlayerPedId())
Wait(150)
SetModelAsNoLongerNeeded(model)

if isPedFreemodeModel(cache.ped) then
Expand Down

0 comments on commit 5083e4f

Please sign in to comment.