Skip to content

Commit

Permalink
fix(client): Ped armour fix for reloadskin (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheiLLeniumStudios authored Jul 2, 2022
1 parent 866e797 commit f626ade
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ RegisterNetEvent('fivem-appearance:client:reloadSkin', function()
local playerPed = PlayerPedId()
local health = GetEntityHealth(playerPed)
local maxhealth = GetEntityMaxHealth(playerPed)
local armour = GetPedArmour(playerPed)

QBCore.Functions.TriggerCallback('fivem-appearance:server:getAppearance', function(appearance)
if not appearance then
Expand All @@ -527,6 +528,7 @@ RegisterNetEvent('fivem-appearance:client:reloadSkin', function()
SetPedMaxHealth(playerPed, maxhealth)
Citizen.Wait(1000) -- Safety Delay
SetEntityHealth(playerPed, health)
SetPedArmour(playerPed, armour)
ResetRechargeMultipliers()
end)
end)
Expand Down

0 comments on commit f626ade

Please sign in to comment.