From 3ca8e7ff76b155ea3fce9ca9f22fab8ed181c5cc Mon Sep 17 00:00:00 2001 From: darknight2590 <87971656+darknight2590@users.noreply.github.com> Date: Sat, 1 Jan 2022 20:24:39 +0200 Subject: [PATCH] make IsWearingHandshoes in core --- client/functions.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/client/functions.lua b/client/functions.lua index 28b693b..11e705b 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -236,6 +236,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.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) local ped = PlayerPedId() if coords then