Merge pull request #413 from darknight2590/patch-17

make IsWearingGloves in core
This commit is contained in:
Kakarot
2022-01-06 19:51:31 -06:00
committed by GitHub
2 changed files with 25 additions and 1 deletions
+16
View File
@@ -204,6 +204,22 @@ function QBCore.Functions.GetClosestPed(coords, ignoreList)
return closestPed, closestDistance
end
function QBCore.Functions.IsWearingGloves()
local armIndex = GetPedDrawableVariation(PlayerPedId(), 3)
local model = GetEntityModel(PlayerPedId())
local retval = true
if model == `mp_m_freemode_01` then
if QBCore.Shared.MaleNoGloves[armIndex] ~= nil and QBCore.Shared.MaleNoGloves[armIndex] then
retval = false
end
else
if QBCore.Shared.FemaleNoGloves[armIndex] ~= nil and QBCore.Shared.FemaleNoGloves[armIndex] then
retval = false
end
end
return retval
end
function QBCore.Functions.GetClosestPlayer(coords)
local ped = PlayerPedId()
if coords then