I think u need this maybe
RegisterNetEvent("ARPF:armor")
AddEventHandler("ARPF:armor", function()
local prop = "prop_ld_health_pack"
playerPed = GetPlayerPed(-1)
local pedPos = GetEntityCoords(playerPed, false)
exports['progressBars']:startUI(7000, "Shielding") -- Progress Bar can be changed if you dont have it
RequestAnimDict("misslsdhsclipboard@idle_a")
while not HasAnimDictLoaded("misslsdhsclipboard@idle_a") do
Citizen.Wait(100)
end
TaskPlayAnim(GetPlayerPed(PlayerId()), "misslsdhsclipboard@idle_a", "idle_a", 1.0, -1, -1, 50, 0, 0, 0, 0)
local bone = GetPedBoneIndex(GetPlayerPed(-1), 18905) -- 18905 28422
local heals = CreateObject(GetHashKey(prop), 1.0, 1.0, 1.0, 1, 1, 0)
shieldEntitys = heals
--AttachEntityToEntity(shieldEntitys, playerPed, bone, 0.18, 0.0, 0.0, 135.0, -100.0, 0.0, 1, 0, 0, 0, 2, 1)
AttachEntityToEntity(shieldEntitys, playerPed, bone, 0.15, 0.05, -0.01, 180.0, 220.0, 20.0, 1, 1, 0, 0, 2, 1)
-- ["xR"] = 315.0,["yR"] = 288.0, ["zR"] = 0.0
Citizen.Wait(7000)
DeleteEntity(shieldEntitys)
SetPedArmor(playerPed, 30) --30 is the amount of armor
StopAnimTask(PlayerPedId(), 'misslsdhsclipboard@idle_a', 'idle_a', 1.0)