That will stop the drawing. Try this:
local x,y = guiGetScreenSize ()
addEventHandler ("onClientRender", root,
function (source)
local pVehicle = getPedOccupiedVehicle (localPlayer)
if pVehicle then
local vHealth = (getElementHealth (pVehicle)-250)/10
if vHealth < 0 then
vHealth = 0
end
dxDrawLine (x/1.05, y/2.1, x/1.05, y/4, tocolor (255, 255, 255)) -- HOR
dxDrawLine (x/1.125, y/2.1, x/1.125, y/4, tocolor (255, 255, 255)) -- HOR
dxDrawLine (x/1.05, y/2.1, x/1.125, y/2.1, tocolor (255, 255, 255)) -- VER
dxDrawLine (x/1.05, y/3.5, x/1.125, y/3.5, tocolor (255, 255, 255)) -- VER
dxDrawRectangle (x/1.124, y/2.1,x/15.795, y/-3.97*vHealth/100, tocolor (0, 255, 0, 200)) -- GREEN ARENA
end
end
)