Why the hell is it taking like 0.06 ms. It´s just a normal healthbar. And one question. Did you get Kanikuly´s permission to release it? Because it´s just remade rtx_ui.
Cool release, but not sure about the optimalized part.
If u HAVE to use this kind of getting if ped is in veh, I would do following:
Citizen.CreateThread(function()
while true do
Citizen.Wait(500)
local playerped = PlayerPedId()
if IsPedInAnyVehicle(playerped, false) then
DisplayRadar(true)
else
DisplayRadar(false)
end
SendNUIMessage({
action = "updateHealth",
value = GetEntityHealth(playerped) - 100,
valuearmor = GetPedArmour(playerped)
})
end
end)