mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-09-04 09:13:29 +00:00
make IsWearingHandshoes in core
This commit is contained in:
@@ -236,6 +236,22 @@ function QBCore.Functions.GetClosestPed(coords, ignoreList)
|
|||||||
return closestPed, closestDistance
|
return closestPed, closestDistance
|
||||||
end
|
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.MaleNoHandshoes[armIndex] ~= nil and QBCore.Shared.MaleNoHandshoes[armIndex] then
|
||||||
|
retval = false
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if QBCore.Shared.FemaleNoHandshoes[armIndex] ~= nil and QBCore.Shared.FemaleNoHandshoes[armIndex] then
|
||||||
|
retval = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return retval
|
||||||
|
end
|
||||||
|
|
||||||
function QBCore.Functions.GetClosestPlayer(coords)
|
function QBCore.Functions.GetClosestPlayer(coords)
|
||||||
local ped = PlayerPedId()
|
local ped = PlayerPedId()
|
||||||
if coords then
|
if coords then
|
||||||
|
|||||||
Reference in New Issue
Block a user