So I have installed a map and mini map on my QBCore server but whenever I enter the server I have a grey square around my mini map and the old blue and green health/armour bar too.
Can anyone help with how I remove them from behind my mini map?
Thank you
Hey
The following Natives should resolve the problem :
--Put to false will hide the radar
DisplayRadar(toggle --[[ boolean ]])
--Put to false will hide the HUD
DisplayHud(toggle --[[ boolean ]])
https://docs.fivem.net/natives/?_0xA0EBB943C300E693
https://docs.fivem.net/natives/?_0xA6294919E56FF02A
Thank you for the reply appreciate it. Sorry for being so dumb but where do I put this?
No worries, you can put it at the top of the client script of the new hud/minimap you installed on your server for example.
Ok so like this:
DisplayRadar(toggle – false)
DisplayHud(toggle – false)
No like this :
DisplayRadar(false)
DisplayHud(false)
In LUA everything that as ‘–’ in front of it, is a comment
Appreciate your help so much.
I still cannot remove it though for some reason, I guess I am doing it wrong.
This is my client.lua for the map I installed and where I put the code you mentioned:
DisplayRadar(false)
DisplayHud(false)
Citizen.CreateThread(function()
SetMapZoomDataLevel(0, 0.96, 0.9, 0.08, 0.0, 0.0)
SetMapZoomDataLevel(1, 1.6, 0.9, 0.08, 0.0, 0.0)
SetMapZoomDataLevel(2, 8.6, 0.9, 0.08, 0.0, 0.0)
SetMapZoomDataLevel(3, 12.3, 0.9, 0.08, 0.0, 0.0)
SetMapZoomDataLevel(4, 22.3, 0.9, 0.08, 0.0, 0.0)
end)
Citizen.CreateThread(function()
while true do
Citizen.Wait(1)
if IsPedOnFoot(GetPlayerPed(-1)) then
SetRadarZoom(1100)
elseif IsPedInAnyVehicle(GetPlayerPed(-1), true) then
SetRadarZoom(1100)
end
end
end)
I just learned something, I wasn’t very familiar with the basic HUD and with those natives. Apparently ‘DisplayRadar(false)’ is enought to hide the health/armour/minimap.
The issue here being that the script your use to modify you minimap is still using the minimap of the base game so if you hide the health and armour bars with the Native you will hide your minimap too in theory.
So is there a way for me to just remove the outer square and bars or not with this map?
With DisplayRadar(false) u hide all the map, u can use this [Release][GFX] Remove HP/ARMOUR Minimap + Remove Red Reticle to remove the gta5 hud.
OMG you are my hero! Thank you so much it worked perfectly
And i recommend you to change GetPlayerPed(-1)
for PlayerPedId()
it’s better and not old. have a good day!