render.sampcan = function (x, y) local health = getElementHealth(localPlayer) local maxhealth = getPedMaxHealth(LocalPlayer) dxDrawRectangle( x, y, x + widgets.sampcan.sizeX, y + widgets.sampcan.sizeY, tocolor(0, 0, 0, 254), false) -- health bar dxDrawRectangle( x, y, x + widgets.sampcan.sizeX, y + widgets.sampcan.sizeY, tocolor(39, 39, 38, 150), false) -- health shadow dxDrawRectangle( x, y, x + widgets.sampcan.sizeX, y + widgets.sampcan.sizeY*health, tocolor(200, 15, 15, 255), false) -- health end