brp-fivem-appearance icon indicating copy to clipboard operation
brp-fivem-appearance copied to clipboard

Character doesn't show when first spawn if not using command

Open luthanirgi opened this issue 3 years ago • 1 comments

using command /reloadskin fix this issue, but i tried this instead using command and not working at all.

local playerLoaded = false
local firstSpawn = true
AddEventHandler('esx:onPlayerSpawn', function()
    Citizen.CreateThread(function()
        while not playerLoaded do
            Citizen.Wait(100)
        end

        if firstSpawn then
          ESX.TriggerServerCallback('fivem-appearance:getPlayerSkin', function(appearance)
               exports['fivem-appearance']:setPlayerAppearance(appearance)
          end)
          firstSpawn = false
        end
    end)
end)

luthanirgi avatar Sep 20 '21 15:09 luthanirgi

Did you found a solution? having the same issue

ImpulsJL avatar Nov 17 '21 00:11 ImpulsJL