❔FAQ
German text still visible in HUD
How to fix:
Open
risk-hud\html\main.jsPress
Ctrl + Fand search for:const desc = isAdded ? 'Item hinzugefügt' : 'Item entfernt';Replace with:
const desc = isAdded ? 'Item added' : 'Item removed';Save the file and restart the script.
Item or weapon images not visible
How to fix:
Check folder paths:
risk-hud\html\images\items→ item imagesrisk-hud\html\images\weapons→ weapon images
Verify all images are
.pngfiles.Ensure filenames exactly match item names (case-sensitive).
Example: item
water→ filewater.png
Clear browser/NUI cache and restart the resource if images still don’t appear.
Custom Health & Armor Bars
Add the code below to any client.lua — it doesn’t matter which one, as long as it’s a client-side file.
Avoid placing it inside an escrow-protected script.
You can adjust colors, size, position. The default GTA bars will be hidden automatically.
local healthColor = {r = 255, g = 255, b = 0, a = 230}
local armorColor = {r = 0, g = 190, b = 255, a = 230}
local healthBg = {r = 10, g = 10, b = 10, a = 190}
local armorBg = {r = 20, g = 20, b = 20, a = 190}
local function drawRect(x, y, w, h, r, g, b, a)
DrawRect(x, y, w, h, r, g, b, a)
end
local function getAnchor()
local s = GetSafeZoneSize()
local safe = (1.0 - s) * 10.0
local offX = 0.004 + safe * 0.005
local offY = 0.004 + safe * 0.005
local left = offX
local bottom = 1.0 - offY
return left, bottom
end
CreateThread(function()
local minimap = RequestScaleformMovie("minimap")
while not HasScaleformMovieLoaded(minimap) do Wait(0) end
SetRadarBigmapEnabled(true, false)
Wait(0)
SetRadarBigmapEnabled(false, false)
local printed = false
while true do
BeginScaleformMovieMethod(minimap, "SETUP_HEALTH_ARMOUR")
ScaleformMovieMethodAddParamInt(3)
EndScaleformMovieMethod()
local left, bottom = getAnchor()
local bw = 0.069
local bh = 0.009
local by = bottom - 0.020
local shift = 0.010
local gap = 0.003
local hbx = left + bw * 0.5 + shift
local abx = left + bw + gap + bw * 0.5 + shift
local ped = PlayerPedId()
local hp = GetEntityHealth(ped)
local maxhp = GetEntityMaxHealth(ped)
if maxhp < 1 then maxhp = 200 end
local hRatio = math.max(0.0, math.min(1.0, (hp - 100) / (maxhp - 100)))
local aRatio = math.max(0.0, math.min(1.0, GetPedArmour(ped) / 100.0))
drawRect(hbx, by, bw, bh, healthBg.r, healthBg.g, healthBg.b, healthBg.a)
drawRect(hbx - (bw * 0.5) + (bw * hRatio) * 0.5, by, bw * hRatio, bh, healthColor.r, healthColor.g, healthColor.b, healthColor.a)
drawRect(abx, by, bw, bh, armorBg.r, armorBg.g, armorBg.b, armorBg.a)
drawRect(abx - (bw * 0.5) + (bw * aRatio) * 0.5, by, bw * aRatio, bh, armorColor.r, armorColor.g, armorColor.b, armorColor.a)
if not printed then
print("[hud] custom health/armor with distinct backgrounds + gap")
printed = true
end
Wait(0)
end
end)Last updated