Minimap without Health & armour bar

Hey,

I am trying to find a way to delete the default health & armour bar that below the minimap.
I used the DisplayRadar() command but this deletes the Minimap aswell.
Any ideas how to fix this?

4 Likes

Don’t think there’s any way known using natives, you could try this

2 Likes

There is a native way by using the Minimap scaleform. I did exactly this in one of my earlier projects:

All you would need to do is:

  1. Copy this file into a resource
    https://github.com/glitchdetector/fivem-lite-transportation/blob/master/resources/sessionmanager/scripts/dependencies/dep_minimap.lua

  2. Use SetHealthArmorType(3) in a loop (might not need to be a loop, but in the original source I did use it in a loop)

This snippet might also work, although I can’t confirm if it works exactly as the above does.

Citizen.CreateThread(function()
    local minimap = RequestScaleformMovie("minimap")
    SetRadarBigmapEnabled(true, false)
    Wait(0)
    SetRadarBigmapEnabled(false, false)
    while true do
        Wait(0)
        BeginScaleformMovieMethod(minimap, "SETUP_HEALTH_ARMOUR")
        ScaleformMovieMethodAddParamInt(3)
        EndScaleformMovieMethod()
    end
end)

(bigmap is enabled and disabled to refresh the scaleform, I’m not aware of any other way to do so)

11 Likes

That’s really neat, I remember some stuff like that but never got it to work. Thanks!

this is a snippets ?

2 Likes

Where Do I put it in to hide the default health and armor?

Also this b2k didn’t work for me

Never mind I got b2k to work thanks

Thank you for this code… saved me headaches! working flawlessly…

1 Like

Hi! I’ve tried this method and it kinda works, I’m getting rid of the health bar but the map goes dark grey and I can only see 1 road in the distance, what I’m doing wrong?
Thanks for the help!!
image

So it turns out calling the natives did the jobs, can confirm this snippet works!

Citizen.CreateThread(function()
local minimap = RequestScaleformMovie(“minimap”)
SetRadarBigmapEnabled(true, false)
Wait(0)
SetRadarBigmapEnabled(false, false)
while true do
Wait(0)
Citizen.InvokeNative(0xF6E48914C7A8694E, minimap, “SETUP_HEALTH_ARMOUR”)
Citizen.InvokeNative(0xC3D0841A0CC546A6,3)
Citizen.InvokeNative(0xC6796A8FFA375E53 )
end
end)

how can I hide a notification above the minimap, with lua script?

for me does this the trick
client.lua

Citizen.CreateThread(function()
    local minimap = RequestScaleformMovie("minimap")
    SetRadarBigmapEnabled(false, false)
    while true do
        Wait(0)
        BeginScaleformMovieMethod(minimap, "SETUP_HEALTH_ARMOUR")
        ScaleformMovieMethodAddParamInt(3)
        EndScaleformMovieMethod()
    end
end)
8 Likes

it works in 2021?

Probably? It’ll take you 2 minutes to find out.

1 Like

tank you, it works

hey brother where you put it i have the same problem

Not in V1 Final. It will sometimes show a small map without bars, but most of the time it shows the large map that takes up 1/4 of your screen.

Can someone show me where to put the files so the minimap doesn’t show the health and armor hud

Put it anywhere in a client.lua

-- remove health and armour stats on minimap

Citizen.CreateThread(function()

    local minimap = RequestScaleformMovie("minimap")

    SetRadarBigmapEnabled(true, false)

    Wait(0)

    SetRadarBigmapEnabled(false, false)

    while true do

        Wait(0)

        BeginScaleformMovieMethod(minimap, "SETUP_HEALTH_ARMOUR")

        ScaleformMovieMethodAddParamInt(3)

        EndScaleformMovieMethod()

    end

end)
5 Likes