• My Hud Is Messed up please help!
    0 replies, posted
Hey I have a hud that i made but when i change my dimensions it messes up the hud heres the code [code] function hud() local DrawHealth = LocalPlayer():Health() or 0 local DrawArmor = LocalPlayer():Armor() or 0 local ply = LocalPlayer() local x = ScrH() / 2 local y = ScrW() / 2 draw.RoundedBox(2, x - 360, y - 100, 500, 175, Color(255,255,255,255)) draw.DrawText(ply:Nick(), "Trebuchet24", x - 210, y - 100, Color(0,0,0,255)) draw.RoundedBox(2, x - 360, y - 75, 500, 2, Color(0,0,0,255)) draw.DrawText(LocalPlayer():getDarkRPVar( "job" ), "Trebuchet24", x - 150, y - 65, Color(0,0,0,255)) draw.DrawText("+ " .. LocalPlayer():getDarkRPVar( "salary" ), "Trebuchet24", x - 285, y - 20, Color(0,0,0,255)) draw.DrawText("$: " .. LocalPlayer():getDarkRPVar( "money" ), "Trebuchet24", x - 20, y - 20, Color(0,0,0,255)) draw.RoundedBox(2, x - 360, y - 30, 500, 2, Color(0,0,0,255)) if DrawHealth > 100 then DrawHealth = 100 end if DrawHealth < 0 then DrawHealth = 0 end if DrawArmor > 100 then DrawArmor = 100 end if DrawArmor < 0 then DrawArmor = 0 end draw.RoundedBox(0, x - 350, y - 0+18, 480+4, 24, Color(0,0,0,255)) draw.RoundedBox(0, x - 350, y - 0+48, 480+4, 24, Color(0,0,0,255)) draw.RoundedBox(0, x - 348, y - 0+20, 480 * DrawHealth / 100, 20, Color(255,0,0,255)) draw.RoundedBox(0, x - 348, y - 0+50, 480 * DrawArmor / 100, 20, Color(0,0,255,255)) draw.DrawText("HP: ".. ply:Health(), "Trebuchet24", x - 200, y - 0+18, Color(0,255,0,255)) draw.DrawText("Armor: ".. ply:Armor(), "Trebuchet24", x - 200, y - 52+100, Color(127,0,95,255)) end hook.Add("HUDPaint", "SkaterHud", hud) [/code] Any help thanks!
Sorry, you need to Log In to post a reply to this thread.