SUP Как переместить худ законов

Как переместить худ законов ровно в правый верхний угол чтоб не было пробела сверху

function GM:DrawLaws()
local w = (ScrW() * .175)
local text = string.Wrap(‘HudFontLaws’,
nw.GetGlobal(‘TheLaws’) or rp.cfg.DefaultLaws,
w - 6
)
local h = (#text * 15) + 39

local x, y = (ScrW() - w), 35

draw_OutlinedBox(x, y, w, h, Color(color_bg.r, color_bg.g, color_bg.b, 200), Color(75, 75, 75, 255))


surface.DrawOutlinedRect(x, y, 30, 30)
surface.DrawOutlinedRect(x + 29, y, w - 29, 30)

surface.SetDrawColor(255, 255, 255)
surface.SetMaterial(mat_laws)
surface.DrawTexturedRect(x + 1, y + 1, 28, 28)

surface.SetDrawColor(color_laws.r, color_laws.g, color_laws.b, color_laws.a)
surface.DrawRect(x + 30, y + 1, w - 31, 28)


local col = varcol('TheLaws', nw.GetGlobal('TheLaws'))
surface.SetFont('HudFontLaws1')
surface.SetTextColor(col.r, col.g, col.b, col.a)
surface.SetTextPos(x + 34, y + 4)
surface.DrawText('Законы')


y = y + 29
surface.SetFont('HudFontLaws')
local textX, textY = (x + 5), y + 2
for k, v in ipairs(text) do
    surface.SetTextPos(textX, textY + ((k - 1) \* 15))
    surface.DrawText(v)
end

end

Поменяй 35 на 0

1 лайк