added, all resolutions, and added getPedStat to health in 200%
local screenW,screenH = guiGetScreenSize()
local resW, resH = 1280, 720
local x, y = (screenW/resW), (screenH/resH)
local maxAngle = 180
addEventHandler ( "onClientRender", root,
function ( )
local stat = getPedStat ( getLocalPlayer(), 24 )
local hp = getElementHealth ( localPlayer ) * ( maxAngle / 100 )
if stat < 1000 then
dxDrawCircle ( ( x - 50 ) / 2, ( y - 50 ) / 2, 50, 5, 1, 0, hp, tocolor ( 255, 0, 0, 255 ), false )
else
dxDrawCircle ( ( x - 50 ) / 2, ( y - 50 ) / 2, 50, 5, 1, 0, hp, tocolor ( 255, 0, 0, 255 ), false )
end
end)